Skip to content

Commit

Permalink
Merge pull request #54 from novoda/feature/RM-53-TabBarController-Swi…
Browse files Browse the repository at this point in the history
…ftUI

Feature [RM53] TabBarController to SwiftUI view
  • Loading branch information
swg99 authored Jul 29, 2021
2 parents a13f1bb + 398d5c3 commit 1e8eabb
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 86 deletions.
Binary file modified .DS_Store
Binary file not shown.
28 changes: 8 additions & 20 deletions Rick-and-Morty/Rick And Morty.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@

/* Begin PBXBuildFile section */
1711B39C26B16D6200BE935B /* CharactersView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1711B39B26B16D6200BE935B /* CharactersView.swift */; };
1711B39E26B1898100BE935B /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1711B39D26B1898100BE935B /* ContentView.swift */; };
17CAB4FA26A824470048F2F1 /* CharacterCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17CAB4F926A824470048F2F1 /* CharacterCell.swift */; };
17F1E38226A18A54009C1CDB /* CharacterCollectionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17F1E38126A18A54009C1CDB /* CharacterCollectionViewController.swift */; };
17F1E38426A18EA8009C1CDB /* TabBarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17F1E38326A18EA8009C1CDB /* TabBarController.swift */; };
17F1E38626A1AF6A009C1CDB /* Character.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17F1E38526A1AF6A009C1CDB /* Character.swift */; };
17F1E38A26A1D877009C1CDB /* CharacterCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17F1E38926A1D877009C1CDB /* CharacterCollectionViewCell.swift */; };
17F1E38D26A1DCF0009C1CDB /* Data.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17F1E38C26A1DCF0009C1CDB /* Data.swift */; };
Expand All @@ -35,9 +34,8 @@

/* Begin PBXFileReference section */
1711B39B26B16D6200BE935B /* CharactersView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CharactersView.swift; sourceTree = "<group>"; };
1711B39D26B1898100BE935B /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
17CAB4F926A824470048F2F1 /* CharacterCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CharacterCell.swift; sourceTree = "<group>"; };
17F1E38126A18A54009C1CDB /* CharacterCollectionViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CharacterCollectionViewController.swift; sourceTree = "<group>"; };
17F1E38326A18EA8009C1CDB /* TabBarController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabBarController.swift; sourceTree = "<group>"; };
17F1E38526A1AF6A009C1CDB /* Character.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Character.swift; sourceTree = "<group>"; };
17F1E38926A1D877009C1CDB /* CharacterCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CharacterCollectionViewCell.swift; sourceTree = "<group>"; };
17F1E38C26A1DCF0009C1CDB /* Data.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Data.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -83,21 +81,13 @@
path = Models;
sourceTree = "<group>";
};
17F1E38B26A1DCA0009C1CDB /* ViewControllers */ = {
isa = PBXGroup;
children = (
17F1E38326A18EA8009C1CDB /* TabBarController.swift */,
17F1E38126A18A54009C1CDB /* CharacterCollectionViewController.swift */,
);
path = ViewControllers;
sourceTree = "<group>";
};
17F1E38E26A5724A009C1CDB /* Views */ = {
isa = PBXGroup;
children = (
17F1E38926A1D877009C1CDB /* CharacterCollectionViewCell.swift */,
17CAB4F926A824470048F2F1 /* CharacterCell.swift */,
1711B39B26B16D6200BE935B /* CharactersView.swift */,
1711B39D26B1898100BE935B /* ContentView.swift */,
);
path = Views;
sourceTree = "<group>";
Expand All @@ -124,7 +114,6 @@
isa = PBXGroup;
children = (
17F1E38E26A5724A009C1CDB /* Views */,
17F1E38B26A1DCA0009C1CDB /* ViewControllers */,
17F1E38026A184F3009C1CDB /* Models */,
B811686C1CFF1C9900301A0A /* AppDelegate.swift */,
B81168721CFF1C9900301A0A /* Main.storyboard */,
Expand Down Expand Up @@ -250,10 +239,9 @@
buildActionMask = 2147483647;
files = (
17F1E38D26A1DCF0009C1CDB /* Data.swift in Sources */,
1711B39E26B1898100BE935B /* ContentView.swift in Sources */,
B811686D1CFF1C9900301A0A /* AppDelegate.swift in Sources */,
17F1E38226A18A54009C1CDB /* CharacterCollectionViewController.swift in Sources */,
17CAB4FA26A824470048F2F1 /* CharacterCell.swift in Sources */,
17F1E38426A18EA8009C1CDB /* TabBarController.swift in Sources */,
B81168931CFF234900301A0A /* Rick.swift in Sources */,
1711B39C26B16D6200BE935B /* CharactersView.swift in Sources */,
17F1E38626A1AF6A009C1CDB /* Character.swift in Sources */,
Expand Down Expand Up @@ -348,7 +336,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.5;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -398,7 +386,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.5;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
Expand All @@ -414,7 +402,7 @@
CODE_SIGN_STYLE = Manual;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = "Rick And Morty/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.5;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.novoda.Rick-And-Morty";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -432,7 +420,7 @@
CODE_SIGN_STYLE = Manual;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = "Rick And Morty/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.5;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.novoda.Rick-And-Morty";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
13 changes: 7 additions & 6 deletions Rick-and-Morty/Rick And Morty/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import UIKit
import SwiftUI

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
return true
@main
struct RickAndMorty: App {
var body: some Scene {
WindowGroup {
ContentView()
}
}
}

This file was deleted.

This file was deleted.

31 changes: 31 additions & 0 deletions Rick-and-Morty/Rick And Morty/Views/ContentView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
//
// ContentView.swift
// Rick And Morty
//
// Created by Scottie Gray on 2021-07-28.
// Copyright © 2021 Novoda. All rights reserved.
//

import SwiftUI

struct ContentView: View {

var body: some View {
TabView {
CharactersView(characters: ricks, title: "Ricks")
.tabItem {
Label("Ricks", image: "rick-icon")
}
CharactersView(characters: morties, title: "Morties")
.tabItem {
Label("Morties", image: "morty-icon")
}
}
}
}

struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}

0 comments on commit 1e8eabb

Please sign in to comment.