codecamp

CAPickerViewDelegate

类说明

CAPickerView的滚动事件的代理


CAPickerViewDelegate 方法(点击查看方法介绍)

方法说明
numberOfComponentsInPickerView获取PickerView的Component数量
numberOfRowsInComponent获取PickerView的Component行数
widthForComponentPickerView的Component宽度
rowHeightForComponentPickerView的Component高度
titleForRowPickerView的Row标题
viewForRowPickerView的背景图像
viewForSelectPickerView的选中时图像


CAPickerViewDelegate 方法说明

virtual unsigned int numberOfComponentsInPickerView(CAPickerView* pickerView) = 0; 

返回值:unsigned int

参数:

类型参数名说明
CAPickerView* pickerView当前pickerView

解释:获取PickerView的Component数量


virtual unsigned int numberOfRowsInComponent(CAPickerView* pickerView, unsigned int component) = 0;

返回值:unsigned int

参数:

类型参数名说明
CAPickerView* pickerView当前pickerView
unsigned intcomponent当前选中的component

解释:获取PickerView的Component行数


virtual float widthForComponent(CAPickerView* pickerView, unsigned int component) {return 0;}

返回值:float

参数:

类型参数名说明
CAPickerView* pickerView当前pickerView
unsigned intcomponent当前选中的component

解释:PickerView的Component宽度


virtual float rowHeightForComponent(CAPickerView* pickerView, unsigned int component) {return 0;}

返回值:float

参数:

类型参数名说明
CAPickerView* pickerView当前pickerView
unsigned intcomponent当前选中的component

解释:PickerView的Component高度


virtual const char* titleForRow(CAPickerView* pickerView, unsigned int row, unsigned int component) {return NULL;}

返回值:const char*

参数:

类型参数名说明
CAPickerView* pickerView当前pickerView
unsigned introw当前选中的row
unsigned intcomponent当前选中的component

解释:PickerView的Row标题


virtual CAView* viewForRow(CAPickerView* pickerView, unsigned int row, unsigned int component) {return NULL;}

返回值:CAView* 

参数:

类型参数名说明
CAPickerView* pickerView当前pickerView
unsigned introw当前选中的row
unsigned intcomponent当前选中的component

解释:PickerView的背景图像


virtual CAView* viewForSelect(CAPickerView* pickerView, unsigned int component, const DSize& size) {return NULL;}

返回值:CAView* 

参数:

类型参数名说明
CAPickerView* pickerView当前pickerView
unsigned intcomponent当前选中的component
const DSize&size图像大小

解释:PickerView的选中时图像

CAPickerViewDataSource
CAActivityIndicatorView(活动指示器)
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定
目录

四、调用系统支持

八、宏定义

关闭

MIP.setData({ 'pageTheme' : getCookie('pageTheme') || {'day':true, 'night':false}, 'pageFontSize' : getCookie('pageFontSize') || 20 }); MIP.watch('pageTheme', function(newValue){ setCookie('pageTheme', JSON.stringify(newValue)) }); MIP.watch('pageFontSize', function(newValue){ setCookie('pageFontSize', newValue) }); function setCookie(name, value){ var days = 1; var exp = new Date(); exp.setTime(exp.getTime() + days*24*60*60*1000); document.cookie = name + '=' + value + ';expires=' + exp.toUTCString(); } function getCookie(name){ var reg = new RegExp('(^| )' + name + '=([^;]*)(;|$)'); return document.cookie.match(reg) ? JSON.parse(document.cookie.match(reg)[2]) : null; }