iPhone system font

前端 未结 12 553
日久生厌
日久生厌 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:29

    I'm not sure there is an api to get the default system font name. So I just get the name like this :

        //get system default font
        UILabel *label = [[UILabel alloc] init];        
        fontname = label.font.fontName;
        [label release];
    

    Looks stupid but it works.

提交回复
热议问题