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() | |
.frame(width: 200, height: 100) | |
Image("soccer") | |
.resizable() |
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") | |
.frame(width: 200, height: 100) | |
Image("soccer") | |
.frame(width: 200, 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 { | |
private let uiImage = UIImage(named: "soccer")! | |
var body: some View { | |
Image(uiImage: uiImage) | |
} | |
} |
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 { | |
Image("soccer") | |
} | |
} |
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 private var password = "" | |
@State private var inputText = "" | |
var body: some View { | |
VStack { | |
SecureField("パスワードを入力してください。", text: $inputText, onCommit: { |
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 { | |
@State private var name = "" | |
@State private var inputText = "" | |
var body: some View { | |
VStack { | |
TextField("名前を入力してください", text: $inputText, | |
onEditingChanged: { isBegin in | |
if isBegin { |
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 { | |
@State private var name = "" | |
var body: some View { | |
TextField("", text: $name) | |
.font(.title) | |
.keyboardType(.numberPad) | |
.padding(20) | |
} |
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 { | |
@State private var name = "" | |
var body: some View { | |
VStack(spacing: 20) { | |
TextField("PlainTextFieldStyle", text: $name) | |
.font(.title) | |
.textFieldStyle(PlainTextFieldStyle()) | |
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 { | |
@State private var name = "" | |
var body: some View { | |
TextField("名前を入力してください。", text: $name) | |
.font(.title) | |
} | |
} |
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 { | |
Text(verbatim: "test") | |
} | |
} |