Text attribute attributes1.nskernattributename: @ 10 adjust the expression kerning. 2. nsfontattributename: [uifont systemfontofsize: _ fontsize] Set Font 3. nsforegroundcolorattributename: [uicolor redcolor] sets the text color 4. nsparagraphstyleattributename: paragraph set paragraph style 5. nsmutableparagraphstyle * Paragraph = [[nsmutableparagraphstyle alloc] init]; paragraph. alignment = nstextalignmentcenter; 6. nsbackgroundcolorattributename: [uicolor blackcolor] sets the background color 7. nsstrokecolorattributename: Specifies the stroke color. You need to set the stroke width with nsstrokewidthattributename to make the text hollow.
The value of nsstrokewidthattributename is an nsnumber object (decimal ). This value changes the stroke width (percentage relative to the font size ). The default value is 0. Only the width of the stroke is changed. The negative number simultaneously changes the stroke and fill width of the text. For example, for common hollow words, this value is usually 3.0.
At the same time, two hollow attributes are set, and the nsstrokewidthattributename attribute is set to an integer, so the text foreground is ineffective.
Effect:
Effect:
8. Add strikethroughstyleattributename and strikethrough
Effect:
9. Add an underscore to nsunderlinestyleattributename
Effect:
10. nsshadowattributename is used to set the shadow. It cannot be set separately. It must be used with other attributes.
And either of the three, nsverticalglyphformattributename, nsobliquenessattributename, nsexpansionattributename
11. nsverticalglyphformattributename
The value corresponding to this attribute is an nsnumber object (integer ). 0 indicates horizontal text. 1 indicates the vertical text. In iOS, horizontal text is always used. values other than 0 are not defined.
Effect:
12. nsobliquenessattributename sets the font skew. Skew skew
Effect:
13. nsexpansionattributename
Effect: