在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
类说明 CAPickerView的数据代理 CAPickerViewDataSource 方法(点击查看方法介绍)
CAPickerViewDataSource 方法说明 virtual unsigned int numberOfComponentsInPickerView(CAPickerView* pickerView) = 0 返回值:unsigned int 参数:
类型 参数名 说明 CAPickerView* pickerView 当前pickerView 解释:设定component的数量 virtual unsigned int numberOfRowsInComponent(CAPickerView* pickerView, unsigned int component) = 0 返回值:unsigned int 参数:
解释:设定component中row的数量 virtual float widthForComponent(CAPickerView* pickerView, unsigned int component) {return 0;} 返回值:float 参数:
解释:设定component的宽
virtual float rowHeightForComponent(CAPickerView* pickerView, unsigned int component) {return 0;} 返回值:float 参数:
解释:设定row的高
virtual CCString* titleForRow(CAPickerView* pickerView, unsigned int row, unsigned int component) {return NULL;} 返回值:CCString* 参数:
解释:设定row的显示内容
virtual CAView* viewForRow(CAPickerView* pickerView, unsigned int row, unsigned int component) {return NULL;} 返回值:CAView* 参数:
解释:设定row的显示内容
virtual CAView* viewForSelect(CAPickerView* pickerView, unsigned int component, const CCSize& size) {return NULL;} 返回值:CAView* 参数:
解释:设定选中row的view |
请发表评论