美文网首页
UIPickerView

UIPickerView

作者: 贝灬小晖 | 来源:发表于2020-06-10 11:22 被阅读0次

UIPickerView 设置选中的颜色

其实用到的还是两个代理方法

-(void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component{
}

-(UIView )pickerView:(UIPickerView )pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view{
}

只是didSelectRow完成的时候 记得刷新

[_pickerView reloadAllComponents];

根据选中的 component row 来确定

相关文章

网友评论

      本文标题:UIPickerView

      本文链接:https://www.haomeiwen.com/subject/dsvutktx.html