-
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.
Created ContentView to replace TabViewController
- Loading branch information
Showing
2 changed files
with
38 additions
and
4 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 |
---|---|---|
@@ -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() | ||
} | ||
} |