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 { | |
| let pokemons: [String] = ["Snorlax", "Pikachu", "Slowpoke"] | |
| var body: some View { | |
| List(pokemons, id: \.self) {pokemon in | |
| HStack { | |
| Text(pokemon) | |
| Spacer() | |
| } |
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 { | |
| let pokemons: [String] = ["Snorlax", "Slowpoke", "Pikachu", "Eevee"] | |
| @State var text: String = "" | |
| var filterdPokemons: [String] { | |
| if text.isEmpty { | |
| return pokemons | |
| } else { | |
| return pokemons.filter {$0.uppercased().contains(text.uppercased())} |
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 { | |
| let pokemons: [String] = ["Snorlax", "Slowpoke", "Pikachu", "Eevee"] | |
| @State var text: String = "" | |
| var filterdPokemons: [String] { | |
| if text.isEmpty { | |
| return pokemons | |
| } else { | |
| return pokemons.filter {$0.uppercased().contains(text.uppercased())} |
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 text: String = "" | |
| let pokemons: [String] = ["Snorlax", "Slowpoke", "Pikachu", "Eevee"] | |
| var filterdPokemons: [String] { | |
| if text.isEmpty { | |
| return pokemons |
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 | |
| import MapKit | |
| struct ContentView: View { | |
| var body: some View { | |
| Map( | |
| initialPosition: | |
| MapCameraPosition.region( | |
| MKCoordinateRegion( | |
| center: CLLocationCoordinate2D(latitude: 35.7005, longitude: 139.7726), |
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 | |
| import MapKit | |
| struct ContentView: View { | |
| @StateObject var viewState: ContentViewState = ContentViewState() | |
| var body: some View { | |
| ZStack { | |
| if let location = viewState.location { | |
| Map( |
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 | |
| import MapKit | |
| struct ContentView: View { | |
| @StateObject var viewState: ContentViewState = ContentViewState() | |
| var body: some View { | |
| ZStack { | |
| if let location = viewState.location { | |
| Map( |
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 | |
| import MapKit | |
| struct ContentView: View { | |
| @StateObject var viewState: ContentViewState = ContentViewState() | |
| var body: some View { | |
| ZStack { | |
| if let location = viewState.location { | |
| Map( |
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 { | |
| var body: some View { | |
| VStack { | |
| Image(.snorlax) | |
| .colorInvert() | |
| } | |
| } | |
| } |
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 { | |
| var body: some View { | |
| VStack(spacing: 0) { | |
| HStack(spacing: 0) { | |
| DayOfWeekText(text: "Sun") | |
| DayOfWeekText(text: "Mon") | |
| DayOfWeekText(text: "Tue") | |
| DayOfWeekText(text: "Wed") |