如何在iOS 7和iOS 6中获取UIPickerview选择器值的默认字体名称和大小。
On iOS 10.3, iPhone and iPad, the default UIPickerView font is:
font-family: ".SFUIDisplay"; font-weight: normal; font-style: normal; font-size: 21.00pt
Below show default font detail and size. I simple made a demo to check for your answer and code is below :-
- (NSString *)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component
{
UILabel *label = [[UILabel alloc] init];
label.text =@"testRr";
NSLog(@"%@",[label font]);
return label.text;
}
Log print is as below -
So when you customize your picker it's upto you to pick which font or size you want to use. you could also add your own font-family.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.