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
struct FirstView: View { | |
@State var flug: Bool = false | |
var body: some View { | |
NavigationView { | |
VStack { | |
NavigationLink(destination: SecondView(), isActive: $flug) { | |
EmptyView() | |
} |
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
struct FirstView: View { | |
@State var isDisable: Bool = false | |
var body: some View { | |
NavigationView { | |
VStack { | |
Toggle(isOn: $isDisable) { | |
Text("リンクを無効にする") | |
}.frame(width: 220) |
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
struct FirstView: View { | |
var body: some View { | |
NavigationView { | |
NavigationLink(destination: SecondView()) { | |
VStack { | |
Image("neko").renderingMode(.original) | |
Text("ネコ") | |
} | |
} |
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
struct FirstView: View { | |
var body: some View { | |
NavigationView { | |
NavigationLink("画面遷移", destination: SecondView()) | |
} | |
} | |
} |
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
import SwiftUI | |
struct ContentView: View { | |
var body: some View { | |
VStack(spacing: 20) { | |
Button(action: {}) { | |
Text("Button").font(.title) | |
} | |
.buttonStyle(DefaultButtonStyle()) |
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
import SwiftUI | |
struct ContentView: View { | |
var body: some View { | |
Button(action: { | |
// タップ時の処理を実装 | |
}) { | |
Image("download") | |
Text("ダウンロード") |
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
import SwiftUI | |
struct ContentView: View { | |
@State var text = "ボタンをタップしてください。" | |
var body: some View { | |
VStack { | |
Button("ボタン") { | |
self.text = "タップされました。" |
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
struct ContentView: View { | |
var body: some View { | |
VStack { | |
Image("soccer") | |
Image("soccer") | |
.renderingMode(.template) | |
.foregroundColor(.red) | |
} | |
} |
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
struct ContentView: View { | |
var body: some View { | |
VStack { | |
Image("soccer") | |
.resizable(capInsets: .init(), resizingMode: .tile) | |
.frame(width: 300, height: 300) | |
Image("soccer") | |
.resizable(capInsets: .init(), resizingMode: .stretch) | |
.frame(width: 300, height: 300) |
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
struct ContentView: View { | |
var body: some View { | |
VStack { | |
Image("soccer") | |
Image("soccer") | |
.resizable() | |
.scaledToFit() | |
.frame(width: 200, height: 100) | |
Image("soccer") |
NewerOlder