One of the content types available in the UIText
structure that identify the semantic meaning expected for a text-entry area. These include support for email addresses, location names, URLs, and telephone numbers, to name just a few.
Instance Method
インスタンスメソッド
text
textContentType(_:)
Sets the text content type for this view, which the system uses to offer suggestions while the user enters text on an iOS or tvOS device.
テキスト内容型をこのビューに対して設定します、それはシステムが提案を申し出るために使います、ユーザがテキストをiOSまたはtvOSデバイス上で入力する間に。
Availability 有効性
- iOS 13.0+
- iPadOS 13.0+
- Mac Catalyst 13.0+
- tvOS 13.0+
Technology
- Swift
UI
Declaration 宣言
func textContentType(_ textContentType: UITextContentType
?) -> some View
Parameters パラメータ
textContentType
Content Type
Discussion 議論
Use this method to set the content type for input text. For example, you can configure a Text
for the entry of email addresses:
TextField("Enter your email", text: $emailAddress)
.textContentType(.emailAddress)