iOS Foundation: system font size

后端 未结 3 885
余生分开走
余生分开走 2021-02-12 23:32

I would like to know if systemFontSize in iOS app tableView is always the same for textLabel? This is are depening to style?

For example when I N

3条回答
  •  不知归路
    2021-02-13 00:06

    System font sizes are not always the same. Beginning in iOS 7 there is Dynamic Type. Users can set their preferred font size in the system settings. This is the recommended way for apps to get and set their font sizes now.

    In the Interface Builder you can choose things like Body or Title 1 under the Font settings. The actual size will be adjusted according to the user's system settings. Programmatically you use UIFont.preferredFont(forTextStyle: ). See this post for more details about doing this in iOS 10 and Swift 3.

    See also

    • Typography docs
    • Text Programming Guide for iOS

提交回复
热议问题