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 { | |
| Text("**Snorlax** is the **most** cute pokemon!\n[About Snorlax](https://en.wikipedia.org/wiki/Snorlax)") | |
| } | |
| } | |
| #Preview { | |
| ContentView() |
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 markdownText: String = "**Snorlax** is the **most** cute pokemon!\n[About Snorlax](https://en.wikipedia.org/wiki/Snorlax)" | |
| var body: some View { | |
| Text(LocalizedStringKey(markdownText)) | |
| } | |
| } |
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 markdownText: String = "**Snorlax** is the **most** cute pokemon!\n[About Snorlax](https://en.wikipedia.org/wiki/Snorlax)" | |
| var body: some View { | |
| Text(LocalizedStringKey(markdownText)) | |
| .tint(Color.red) | |
| } | |
| } |
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 repositories: [Repository] = [] | |
| @State var showingErrorAlert = false | |
| let gitHubAPIRepository = GitHubAPIRepository() | |
| var body: some View { | |
| List(repositories) { repository in |
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 repositories: [Repository] = [] | |
| @State var page = 1 | |
| @State var isFetching = false | |
| @State var showingErrorAlert = false | |
| let gitHubAPIRepository = GitHubAPIRepository() |
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 repositories: [Repository] = [] | |
| @State var page = 1 | |
| @State var isFetching = false | |
| @State var showingErrorAlert = false | |
| let gitHubAPIRepository = GitHubAPIRepository() |
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 userName: String = "" | |
| @State var onEditing: Bool = false | |
| var body: some View { | |
| VStack { | |
| Text(onEditing ? "On Editing" : "Not On Editing") |
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 { | |
| @AppStorage("FAVORITE_POKEMON_NAME") var favoritePokemonName: String = "" | |
| var body: some View { | |
| VStack(spacing: 16) { | |
| Text("Your favorite pokemon is, \(favoritePokemonName)") | |
| Button("Snorlax is my mavorite pokemon.") { |
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 { | |
| Image(.icon) | |
| .resizable() | |
| .frame(width: 200, height: 200) | |
| .overlay( | |
| Text("@takoikatakotako") | |
| .foregroundColor(Color.white) |
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 { | |
| // Tokyo Station(35.6812° N, 139.7671° E) | |
| let tokyoStation = MKCoordinateRegion(center: CLLocationCoordinate2D(latitude: 35.6812, longitude: 139.7671), latitudinalMeters: 10000, longitudinalMeters: 10000) | |
| var body: some View { | |
| Map(initialPosition: .region(tokyoStation)) { | |
| // Akihabara Station(35.6984° N, 139.7731° E) |