Skip to content

Commit

Permalink
Created ContentView to replace TabViewController
Browse files Browse the repository at this point in the history
  • Loading branch information
swg99 committed Jul 28, 2021
1 parent a13f1bb commit 1842440
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Rick-and-Morty/Rick And Morty.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

/* 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 */; };
Expand Down Expand Up @@ -35,6 +36,7 @@

/* 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>"; };
Expand Down Expand Up @@ -98,6 +100,7 @@
17F1E38926A1D877009C1CDB /* CharacterCollectionViewCell.swift */,
17CAB4F926A824470048F2F1 /* CharacterCell.swift */,
1711B39B26B16D6200BE935B /* CharactersView.swift */,
1711B39D26B1898100BE935B /* ContentView.swift */,
);
path = Views;
sourceTree = "<group>";
Expand Down Expand Up @@ -250,6 +253,7 @@
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 */,
Expand Down Expand Up @@ -348,7 +352,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 +402,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 +418,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 +436,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
30 changes: 30 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,30 @@
//
// 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 1842440

Please sign in to comment.