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 need to implement pickerView:viewForRow:forComponent:reusingView:
method in picker's delegate
- (UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view{
UILabel* lbl = (UILabel*)view;
// Customise Font
if (lbl == nil) {
//label size
CGRect frame = CGRectMake(0.0, 0.0, 70, 30);
lbl = [[UILabel alloc] initWithFrame:frame];
[lbl setTextAlignment:UITextAlignmentLeft];
[lbl setBackgroundColor:[UIColor clearColor]];
//here you can play with fonts
[lbl setFont:[UIFont fontWithName:@"Times New Roman" size:14.0]];
}
//picker view array is the datasource
[lbl setText:[pickerViewArray objectAtIndex:row]];
return lbl;
}