-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #54 from novoda/feature/RM-53-TabBarController-Swi…
…ftUI Feature [RM53] TabBarController to SwiftUI view
- Loading branch information
Showing
6 changed files
with
46 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() | ||
} | ||
} | ||
} |
44 changes: 0 additions & 44 deletions
44
Rick-and-Morty/Rick And Morty/ViewControllers/CharacterCollectionViewController.swift
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
Rick-and-Morty/Rick And Morty/ViewControllers/TabBarController.swift
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() | ||
} | ||
} |