What is the default name and font size for UIPickerview selection values ​​in iOS 7 and iOS 6

How to get the default name and font size for UIPickerview selection values ​​in iOS 7 and iOS 6.

+4
source share
2 answers

The details and default font size are shown below. I just made a demo to check your answer and code 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;
}

The printout of the magazine is as follows:

enter image description here

So when you set up your collector, you need to choose which font or size you want to use. You can also add your own font family.

+1
source

On iOS 10.3, iPhone and iPad, the default UIPickerView font is:

font-family: ".SFUIDisplay"; : ; font-style: normal; font-size: 21.00pt

0

Source: https://habr.com/ru/post/1536898/


All Articles