Customizing text styles in Xcode (6.1)

How to set text styles in iOS 6? How to set a font (for example, "Futura 30pt") as the default font for "body"?


(Additional Information)

In this dialog box:

Text Styles Xcode

There is a label that says "Text Styles." I guess this is how you can reuse font styles, but maybe I'm wrong?

If this is not the case, how can I set the text style (for example: as you have h1, h2, body in css, and you can reuse these declarations elsewhere). How to set text style for reuse in Xcode? I am trying to create a printing system.

+5
source share
2 answers

If by “text styles” and “body” you are talking about a dynamic type and its “solid” style ( UIFontTextStyleBody ), as described here , then the problem is that you did not understand what Dynamic Type is. The whole point of Dynamic Type is that the font and size you use do not fit your needs; they depend on the system (and user preference for the size of the text). Using Dynamic Type, you accept the system font selection.

If you want to install the font as Futura 30pt, install it. This has nothing to do with any “styles”. If you want to install all UILabel fonts as Futura 30pt, you can use the appearance proxy. But there is no built-in system of "styles" (unless you yourself create it); it is not a web browser.

+6
source

Anyone who comes here later should check:

https://github.com/tombenner/nui

+4
source

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


All Articles