Possible Duplicate:
UIPickerView Font…
I'm really stuck on this one problem in my application. I searched everywhere to no avail. How can I change the font size in a UIPickerView?
Implement viewForRow:forComponent:
method in picker's data delegate, create UILabel instance in it with the font (and all other properties) you need, e.g.:
- (UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view{
UILabel* tView = (UILabel*)view;
if (!tView){
tView = [[UILabel alloc] init];
// Setup label properties - frame, font, colors etc
...
}
// Fill the label text here
...
return tView;
}
PickerView.transform = CGAffineTransformMakeScale(0.4, 0.4);
精彩评论