UIPickerView设置选中的颜⾊
`
-(void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component{
if (!_isMaster) {
[DBTIPview ProgressHUD:@”⽆权限”];
return;
}
if (component==0) {
sencion0row=row;
startTime=[NSString stringWithFormat:@”%@”,_pickerDataArr[0][row]];
}
else if (component==2){
sencion2row=row;
endTime=[NSString stringWithFormat:@”%@”,_pickerDataArr[1][row]];
}
[_pickerView reloadAllComponents];
}
(UIView )pickerView:(UIPickerView )pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view{
UILabel *lab=[[UILabel alloc]initWithFrame:CGRectMake(component*SCREEN_WIDTH/3, 0, SCREEN_WIDTH/3, 40)];
lab.font=[UIFont systemFontOfSize:18];
if (component==0) {
<=self.pickerDataArr[0][row];
if (row==sencion0row) {
}
}
else if (component==1)view ui框架
{
<=@”⾄”;
}
else{
<=self.pickerDataArr[1][row];
if (row==sencion2row) {
}
}
return lab;
}
`
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论