W3Cschool
恭喜您成為首批注冊用戶
獲得88經(jīng)驗(yàn)值獎(jiǎng)勵(lì)
類說明
CAPickerView的滾動(dòng)事件的代理
CAPickerViewDelegate 方法(點(diǎn)擊查看方法介紹)
方法 | 說明 |
numberOfComponentsInPickerView | 獲取PickerView的Component數(shù)量 |
numberOfRowsInComponent | 獲取PickerView的Component行數(shù) |
widthForComponent | PickerView的Component寬度 |
rowHeightForComponent | PickerView的Component高度 |
titleForRow | PickerView的Row標(biāo)題 |
viewForRow | PickerView的背景圖像 |
viewForSelect | PickerView的選中時(shí)圖像 |
CAPickerViewDelegate 方法說明
virtual unsigned int numberOfComponentsInPickerView(CAPickerView* pickerView) = 0;
返回值:unsigned int
參數(shù):
類型 | 參數(shù)名 | 說明 |
CAPickerView* | pickerView | 當(dāng)前pickerView |
解釋:獲取PickerView的Component數(shù)量
virtual unsigned int numberOfRowsInComponent(CAPickerView* pickerView, unsigned int component) = 0;
返回值:unsigned int
參數(shù):
類型 | 參數(shù)名 | 說明 |
CAPickerView* | pickerView | 當(dāng)前pickerView |
unsigned int | component | 當(dāng)前選中的component |
解釋:獲取PickerView的Component行數(shù)
virtual float widthForComponent(CAPickerView* pickerView, unsigned int component) {return 0;}
返回值:float
參數(shù):
類型 | 參數(shù)名 | 說明 |
CAPickerView* | pickerView | 當(dāng)前pickerView |
unsigned int | component | 當(dāng)前選中的component |
解釋:PickerView的Component寬度
virtual float rowHeightForComponent(CAPickerView* pickerView, unsigned int component) {return 0;}
返回值:float
參數(shù):
類型 | 參數(shù)名 | 說明 |
CAPickerView* | pickerView | 當(dāng)前pickerView |
unsigned int | component | 當(dāng)前選中的component |
解釋:PickerView的Component高度
virtual const char* titleForRow(CAPickerView* pickerView, unsigned int row, unsigned int component) {return NULL;}
返回值:const char*
參數(shù):
類型 | 參數(shù)名 | 說明 |
CAPickerView* | pickerView | 當(dāng)前pickerView |
unsigned int | row | 當(dāng)前選中的row |
unsigned int | component | 當(dāng)前選中的component |
解釋:PickerView的Row標(biāo)題
virtual CAView* viewForRow(CAPickerView* pickerView, unsigned int row, unsigned int component) {return NULL;}
返回值:CAView*
參數(shù):
類型 | 參數(shù)名 | 說明 |
CAPickerView* | pickerView | 當(dāng)前pickerView |
unsigned int | row | 當(dāng)前選中的row |
unsigned int | component | 當(dāng)前選中的component |
解釋:PickerView的背景圖像
virtual CAView* viewForSelect(CAPickerView* pickerView, unsigned int component, const DSize& size) {return NULL;}
返回值:CAView*
參數(shù):
類型 | 參數(shù)名 | 說明 |
CAPickerView* | pickerView | 當(dāng)前pickerView |
unsigned int | component | 當(dāng)前選中的component |
const DSize& | size | 圖像大小 |
解釋:PickerView的選中時(shí)圖像
Copyright©2021 w3cschool編程獅|閩ICP備15016281號-3|閩公網(wǎng)安備35020302033924號
違法和不良信息舉報(bào)電話:173-0602-2364|舉報(bào)郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號
聯(lián)系方式:
更多建議: