UITextfield的鍵盤的設定

2022-09-12 02:36:12 字數 790 閱讀 3268

一、鍵盤風格

uikit框架支援8種風格鍵盤。

typedef enum uikeyboardtype;

用法用例:

textview.keyboardtype= uikeyboardtypenumberpad;

二、鍵盤外觀

typedef enum uireturnkeytype;

用法用例:

textview.returnkeytype=uireturnkeygo;

四、自動大寫

typedef enum uitextautocapitalizationtype;

用法用例:

textfield.autocapitalizationtype = uitextautocapitalizationtypewords;

五、自動更正

typedef enum uitextautocorrectiontype;

用法用例:

textfield.autocorrectiontype = uitextautocorrectiontypeyes;

六、安全文字輸入

textview.securetextentry=yes;

開啟安全輸入主要是用於密碼或一些私人資料的輸入,此時會禁用自動更正和自此快取。

鍵盤的相關設定 UITextfield

一 鍵盤風格 uikit框架支援8種風格鍵盤。typedefenumuikeyboardtype 用法用例 textview.keyboardtype uikeyboardtypenumberpad 二 鍵盤外觀 typedefenumuireturnkeytype 用法用例 textview.re...

UITextField 彈出鍵盤的外觀 型別 設定

uitextfield 彈出鍵盤的外觀 型別 設定 概要 uitextfield 常用的鍵盤屬性如 鍵盤型別 安全輸入等 其實這些屬性並不是 uitextfield 特有的屬性 而是 uitextinputtraits 協議屬性 一共有 8個屬性 文章中盡量不使用或少使用封裝 目的是讓大家清楚為了實...

UITextField編輯後關閉虛擬鍵盤方法筆記

uitextfield編輯框經常會遇到關閉虛擬鍵盤的情況。總結一下,一下的方法。在rootviewcontroller.h中,如下 inte ce rootviewcontroller uiviewcontroller property nonatomic retain uitextfield na...