I was able to change my font color but I also need to change font size, how can I accomplish that? Here\'s my code for chaning the color,
- (NSAttributedStr
You can use following code to set font of pickerview..
- (UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view {
UILabel *tView = (UILabel *)view;
if (!tView){
tView = [[UILabel alloc] init];
[tView setFont:[UIFont .....]];//set font
// Setup label properties - frame, font, colors etc
...
}
// Fill the label text here
...
return tView;
}
I think you have to add NSFontAttributeName
in your list of attributes
and you could use the class method fontWithName:size:
of UIFont