iPhone system font

前端 未结 12 552
日久生厌
日久生厌 2020-12-12 18:31

What is the name of the default system font on the iPhone?

I would like to retrieve this for customizing a UIView.

12条回答
  •  情深已故
    2020-12-12 19:24

    You can always use

    UIFont *systemFont = [UIFont systemFontOfSize:12];
    NSLog(@"what is it? %@ %@", systemFont.familyName, systemFont.fontName);
    

    The answer is:

    Up to iOS 6

     Helvetica Helvetica
    

    iOS 7

    .Helvetica Neue Interface .HelveticaNeueInterface-M3
    

    but you can just use Helvetica Neue

提交回复
热议问题