This file contains hidden or 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
| import SwiftUI | |
| struct ContentView: View { | |
| @State var showingIndicator = true | |
| var body: some View { | |
| ZStack { | |
| VStack { | |
| Spacer() | |
| Button { |
This file contains hidden or 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
| import SwiftUI | |
| struct ContentView: View { | |
| @State var showingIndicator = true | |
| var body: some View { | |
| ZStack { | |
| VStack { | |
| Spacer() | |
| Button { |
This file contains hidden or 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
| import SwiftUI | |
| struct ContentView: View { | |
| @State var pokemon: Pokemon? | |
| var body: some View { | |
| NavigationStack { | |
| List { | |
| Button { | |
| pokemon = .snorlax |
This file contains hidden or 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
| import SwiftUI | |
| struct ContentView: View { | |
| @State var selection: Int = 0 | |
| var body: some View { | |
| TabView(selection: $selection) { | |
| FirstView(selection: $selection) | |
| .tabItem { | |
| Image(systemName: "house") |
This file contains hidden or 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
| import SwiftUI | |
| struct ContentView: View { | |
| @State var percent: Double = 0 | |
| let text = """ | |
| Fly me to the moon | |
| Let me sing among those stars | |
| Let me see what spring is like | |
| On jupiter and mars | |
This file contains hidden or 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
| import SwiftUI | |
| struct ContentView: View { | |
| @State var image: UIImage? | |
| @State var showingAlert: Bool = false | |
| var body: some View { | |
| VStack { | |
| if let image = image { | |
| Image(uiImage: image) |
This file contains hidden or 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
| import SwiftUI | |
| struct ContentView: View { | |
| @State var views = [ | |
| TutorialView(image: Image(.snorlax), text: "First"), | |
| TutorialView(image: Image(.pikachu), text: "Second"), | |
| TutorialView(image: Image(.slowpoke), text: "Third"), | |
| TutorialView(image: Image(.magikarp), text: "Fourth"), | |
| ] |
This file contains hidden or 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
| import Foundation | |
| struct Column: Hashable { | |
| let title: String | |
| let rows: [String] | |
| } |
This file contains hidden or 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
| import SwiftUI | |
| struct ContentView: View { | |
| @State var pokemons: [Pokemon] = [] | |
| var body: some View { | |
| VStack { | |
| ForEach(pokemons) { pokemon in | |
| HStack { | |
| Image(uiImage: pokemon.image) |
This file contains hidden or 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
| import SwiftUI | |
| struct AddItemView: View { | |
| @StateObject var viewState: AddItemViewState | |
| init(items: Binding<[String]>) { | |
| self._viewState = StateObject(wrappedValue: AddItemViewState(items: items)) | |
| } | |
| var body: some View { |