国产chinesehdxxxx野外,国产av无码专区亚洲av琪琪,播放男人添女人下边视频,成人国产精品一区二区免费看,chinese丰满人妻videos

CATextField(輸入框)

2018-09-08 15:35 更新

類(lèi)說(shuō)明

CATextField是單行輸入框控件。主要接收用戶(hù)的文本輸入,多用于用戶(hù)名、密碼、聊天輸入等。


CATextField 屬性(點(diǎn)擊查看方法介紹)

屬性說(shuō)明
Delegate數(shù)據(jù)代理
ClearButtonMode添加按鈕模式
MarginLeft左邊緣
MarginRight右邊緣
FontSize字體大小
PlaceHolderTextPlaceHolder文本內(nèi)容
PlaceHolderColorPlaceHolder文本內(nèi)容顏色
Text文本內(nèi)容
TextColor文本內(nèi)容顏色
KeyboardType鍵盤(pán)類(lèi)型
ReturnTypeReturn鍵類(lèi)型
TextFieldAlignTextField的對(duì)齊方式
SecureTextEntry設(shè)置TextField為密碼輸入框
AllowkeyBoardHide返回鍵恢復(fù)鍵盤(pán)
MaxLenght最大長(zhǎng)度


CATextField 方法(點(diǎn)擊查看方法介紹)

方法說(shuō)明
resignFirstResponder隱藏鍵盤(pán)第一響應(yīng)者狀態(tài)
becomeFirstResponder彈出鍵盤(pán)第一響應(yīng)者狀態(tài)
createWithFrame創(chuàng)建,并指定其Frame
createWithCenter創(chuàng)建,并設(shè)置其Center
init初始化
setMarginImageLeft設(shè)置左邊緣圖像
setMarginImageRight設(shè)置右邊緣圖像
setBackgroundImage設(shè)置背景圖像


CATextField 屬性說(shuō)明

Delegate

類(lèi)型:CATextFieldDelegate*

解釋?zhuān)簲?shù)據(jù)代理,set/get{}。


ClearButtonMode

類(lèi)型:ClearButtonMode

解釋?zhuān)?span>添加按鈕模式,set/get{}。

typedef enum
{
    None = 0,     //正常模式,不添加按鈕
    WhileEditing  //添加清除按鈕
}ClearButtonMode;

MarginLeft

類(lèi)型:int

解釋?zhuān)鹤筮吘墸ㄈ绻x擇默認(rèn):左16,右16),set/get{}。


MarginRight

類(lèi)型:int

解釋?zhuān)河疫吘墸ㄈ绻x擇默認(rèn):左16,右16),set/get{}。


FontSize

類(lèi)型:int

解釋?zhuān)鹤煮w大小,set/get{}。


PlaceHolderText

類(lèi)型:std::string

解釋?zhuān)篜laceHolder文本內(nèi)容,set/get{}。


PlaceHolderColor

類(lèi)型:CAColor4B

解釋?zhuān)篜laceHolder文本內(nèi)容顏色,set/get{}。


Text

類(lèi)型:std::string

解釋?zhuān)何谋緝?nèi)容,set/get{}。


TextColor

類(lèi)型:CAColor4B

解釋?zhuān)何谋緝?nèi)容顏色,set/get{}。


KeyboardType

類(lèi)型:KeyboardType

解釋?zhuān)烘I盤(pán)類(lèi)型,set/get{}。(默認(rèn)為KeyboardTypeDefault類(lèi)型)

typedef enum
{
    Default = 0,
    NumbersAndPunctuation,
    URL,
    NumberPad,
    PhonePad,
    NamePhonePad,
    EmailAddress,
}KeyboardType;


ReturnType

類(lèi)型:ReturnType

解釋?zhuān)篟eturn鍵類(lèi)型,set/get{}。(默認(rèn)ReturnTypeDone類(lèi)型)

typedef enum
{
    Done=0,
    Go,
    Next,
    Search,
    Send
}ReturnType;


TextFieldAlign

類(lèi)型:TextFieldAlign

解釋?zhuān)篢extField的對(duì)齊方式,set/get{}。(默認(rèn):中心)

typedef enum 
{
    Left,
    Center,
    Right
}TextFieldAlign;

SecureTextEntry

類(lèi)型:bool

解釋?zhuān)涸O(shè)置TextField為密碼輸入框,is/set{}。(密碼輸入框,默認(rèn)為假)


AllowkeyBoardHide

類(lèi)型:bool

解釋?zhuān)悍祷劓I恢復(fù)鍵盤(pán),is/set{}。(返回鍵恢復(fù)鍵盤(pán),默認(rèn)為真)


MaxLenght

類(lèi)型:int

解釋?zhuān)鹤畲箝L(zhǎng)度,set/get{}。


CATextField 方法說(shuō)明

virtual bool resignFirstResponder();

返回值:bool

參數(shù):

解釋?zhuān)弘[藏鍵盤(pán)第一響應(yīng)者狀態(tài)


virtual bool becomeFirstResponder();

返回值:bool

參數(shù):

解釋?zhuān)簭棾鲦I盤(pán)第一響應(yīng)者狀態(tài)


static CATextField* createWithFrame(const DRect& frame);

返回值:CATextField*

參數(shù):

類(lèi)型參數(shù)名說(shuō)明
const DRect&frame區(qū)域大小

解釋?zhuān)簞?chuàng)建,并指定其Frame


static CATextField* createWithCenter(const DRect& rect);

返回值:CATextField*

參數(shù):

類(lèi)型參數(shù)名說(shuō)明
const DRect&rect中心點(diǎn)的位置及大小

解釋?zhuān)簞?chuàng)建,并設(shè)置其Center


bool init();

返回值:bool

參數(shù):

解釋?zhuān)撼跏蓟?/span>


void setMarginImageLeft(const DSize& imgSize,const std::string& filePath);

返回值:void

參數(shù):

類(lèi)型參數(shù)名說(shuō)明
const DSize&imgSize圖像大小
const std::string& filePath圖像路徑

解釋?zhuān)涸O(shè)置左邊緣圖像


void setMarginImageRight(const DSize& imgSize,const std::string& filePath);

返回值:void

參數(shù):

類(lèi)型參數(shù)名說(shuō)明
const DSize&imgSize圖像大小
const std::string& filePath圖像路徑

解釋?zhuān)涸O(shè)置右邊緣圖像


void setBackgroundImage(CAImage* image);

返回值:void

參數(shù):

類(lèi)型參數(shù)名說(shuō)明
CAImage*image圖像

解釋?zhuān)涸O(shè)置背景圖像


以上內(nèi)容是否對(duì)您有幫助:
在線(xiàn)筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號(hào)
微信公眾號(hào)

編程獅公眾號(hào)