W3Cschool
恭喜您成為首批注冊用戶
獲得88經(jīng)驗(yàn)值獎勵(lì)
類說明
CATextView是多行輸入框,其主要用法和CATextField相似。
CATextView 屬性 (點(diǎn)擊屬性名可查看屬性介紹)
屬性 | 說明 |
TextFontSize | TextView的字體大小 |
Text | TextView的文本內(nèi)容 |
TextColor | TextView的文字顏色 |
Delegate | TextView綁定Delegate |
TextViewAlign | TextView的文本對齊方式 |
ReturnType | TextView的確認(rèn)鍵類型 |
CATextView 方法 (點(diǎn)擊方法名可查看方法介紹)
方法 | 說明 |
setBackGroundImage | 背景圖像 |
resignFirstResponder | 隱藏鍵盤第一響應(yīng)者狀態(tài) |
becomeFirstResponder | 彈出鍵盤第一響應(yīng)者狀態(tài) |
createWithFrame | 創(chuàng)建一個(gè)CATextView,并指定其Frame |
createWithCenter | 創(chuàng)建一個(gè)CATextView,并指定其Center |
CATextView 屬性介紹
類型:int
解釋:設(shè)置TextView的字體大小。set/get{}。
類型:std::string
解釋:設(shè)置TextView的文本內(nèi)容。set/get{}。
類型:CAColor4B
解釋:設(shè)置TextView的文字顏色。set/get{}。
類型:CATextViewDelegate*
解釋:TextView綁定Delegate。set/get{}。
類型:TextViewAlign
解釋:TextView的文本對齊方式。set/get{}。
類型:ReturnType
解釋:TextView的確認(rèn)鍵類型。set/get{}。
CATextView 方法介紹
void setBackGroundImage(CAImage* image);
返回值:void
參數(shù):
類型 | 參數(shù)名 | 說明 |
CAImage* | image | 圖像 |
解釋:設(shè)置輸入框背景圖片
virtual bool resignFirstResponder();
返回值:bool
參數(shù):
解釋:隱藏鍵盤第一響應(yīng)者狀態(tài)
virtual bool becomeFirstResponder();
返回值:bool
參數(shù):
解釋:彈出鍵盤第一響應(yīng)者狀態(tài)
static CATextView* createWithFrame(const DRect& rect);
返回值:CATextView*
參數(shù):
類型 | 參數(shù)名 | 說明 |
const DRect& | rect | 區(qū)域大小 |
解釋:創(chuàng)建,并指定其Frame
static CATextView* createWithCenter(const DRect& rect);
返回值:CATextView*
參數(shù):
類型 | 參數(shù)名 | 說明 |
const DRect& | rect | 中心點(diǎn)的位置及大小 |
解釋:創(chuàng)建,并指定其Center
Copyright©2021 w3cschool編程獅|閩ICP備15016281號-3|閩公網(wǎng)安備35020302033924號
違法和不良信息舉報(bào)電話:173-0602-2364|舉報(bào)郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號
聯(lián)系方式:
更多建議: