ios-detailed Text properties attributes 2014-03-01 21:06:18cnblogs.com-detailed text properties Attributes1.nskernattributename: @10 Adjust sentence kerning sentence adjustment 2.NSFontAttributeName: [Uifont systemfontofsize:_fontsize] Set font 3.NSForegroundColorAttributeName: [Uicolor Redcol or] Set text color 4.nsparagraphstyleattributename:paragraph set paragraph style 5.NSMutableParagraphStyle *paragraph = [[NSM Utableparagraphstyle alloc] init];p aragraph.alignment = nstextalignmentcenter;6.nsbackgroundcolorattributename: [ Uicolor Blackcolor] Set the background color 7.NSStrokeColorAttributeName set the text stroke color, you need and nsstrokewidthattributename set the stroke width, so that the text can be hollow.
Nsstrokewidthattributename the value corresponding to this property is a NSNumber object (decimal). The value changes the stroke width (relative to the percentage of the font size). The default is 0, which does not change. The positive number only changes the stroke width. Negative numbers also change the stroke and fill width of the text. For example, for common hollow words, this value is typically 3.0.
The two properties of the hollow are also set, and the Nsstrokewidthattributename property is set to an integer, and the text foreground color is no effect.
Effect:
Effect:
8. Nsstrikethroughstyleattributename add strikethrough, strikethrough delete line
Effect:
9. Nsunderlinestyleattributename Add Underline
Effect:
Nsshadowattributename Set the shadow, the individual settings are not so, it must be paired with other properties.
And all three of them, Nsverticalglyphformattributename,nsobliquenessattributename,nsexpansionattributename.
11.NSVerticalGlyphFormAttributeName
The value corresponding to this property is a NSNumber object (integer). 0 indicates horizontal text. 1 indicates vertical text. In IOS, horizontal text is always used, and values other than 0 are undefined.
Effect:
Nsobliquenessattributename set the font tilt. Skew Oblique
Effect:
Nsexpansionattributename Setting text flattening
Effect:
Clear Saup
ios-Detailed Text properties attributes