iOS7动态调整文字大小

iOS7添加了动态调整文字的大小,app能够经过接受通知的方式进行设置

 

 iOS 7 introduces Dynamic Type, which makes it easy to display great-looking text in your app.html

 

A message at the smallest sizeios

image: ../Art/mail_message_7_2x.png

A message at the largest non Accessibility sizeapi

image: ../Art/message_large_2x.png

When you adopt Dynamic Type, you get:app

  • Automatic adjustments to letter spacing and line height for every font size.ide

  • The ability to specify different text styles for semantically distinct blocks of text, such as Body,Footnote, or Headline.ui

  • Text that responds appropriately when users change their preferred text size in Settings.this

To take advantage of these features, be prepared to respond to the notifications that get sent when users change the text size setting. Then, use the UIFont method preferredFontForTextStyle to get the new font to use in your UI. iOS 7 optimizes fonts that are specified by this method for maximum legibility at every size. To learn more about text styles and using fonts in your app, see “Text Styles” in Text Programming Guide for iOS.spa

相关文章
相关标签/搜索