ios中修改自定义PickerView的字体颜色
2017-09-01 09:22
302 查看
- (UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view{ UILabel* pickerLabel = (UILabel*)view; if (!pickerLabel){ pickerLabel = [[UILabel alloc] init]; // Setup label properties - frame, font, colors etc //adjustsFontSizeToFitWidth property to YES [pickerLabel setBackgroundColor:[UIColor clearColor]]; [pickerLabel setFont:[UIFont boldSystemFontOfSize:15]]; } // Fill the label text here pickerLabel.text=[self pickerView:pickerView titleForRow:row forComponent:component]; pickerLabel.textAlignment = NSTextAlignmentCenter; return pickerLabel; }
相关文章推荐
- ios中修改自定义PickerView的字体颜色
- iOS WebView修改字体、大小、颜色
- iOSwebView修改字体大小字体颜色背景颜色
- iOS中webView的字体大小/颜色 以及背景颜色修改
- IOS修改titleView的字体颜色
- iOS datepicker 和 pickerView 设置字体颜色
- IOS_设置UITableView Section的背景颜色和字体颜色(自定义section布局)
- listview选中时如何修改textview字体的颜色
- 修改webView的字体颜色,大小,背景色
- ios 设置UITableView 选中行cell的背景颜色(自定义选中的背景颜色)
- iOS修改导航条title字体颜色
- iOS UIAlertController上修改标题(title) 消息(message) 按钮 的字体大小及颜色
- IOS-OC 修改UITextField的Placeholder字体颜色
- 用runtime自定义UIAlertViewController的字体大小和颜色
- TextView的一些高级应用(自定义字体、显示多种颜色、添加阴影)
- 修改alertViewController弹框的字体颜色及字体 iOS
- iOS 修改系统的tabBar的字体颜色
- ios修改textField的placeholder的字体颜色、大小
- ios:改变tableview的titleForHeaderInSection字体颜色设置
- iOS修改UITextField的placeholder的字体颜色大小