🔖

【SwiftUI】キーボードのラベル(submitLabel)一覧

2024/08/11に公開

サンプル

import SwiftUI

struct ContentView: View {
    @State var text:String = ""
    
    var body: some View {
        VStack {
            TextField("何か入力してください", text: $text)
                .submitLabel(.done)            
        }
    }
}

#Preview {
    ContentView()
}

continue

.submitLabel(.continue)

done

.submitLabel(.done)

go

.submitLabel(.go)

join

.submitLabel(.join)

next

.submitLabel(.next)

return

.submitLabel(.return)

route

.submitLabel(.route)

.submitLabel(.search)

send

.submitLabel(.send)

参考

https://developer.apple.com/documentation/swiftui/submitlabel

Discussion