IOS-Attributes text operations, text color changes in the TextFiel box, etc.
Text attribute Attributes1.NSKernAttributeName: @ 10 adjust the sentence kerning adjust the sentence 2. NSFontAttributeName: [UIFont systemFontOfSize: _ fontSize] set the font 3. NSForegroundColorAttribuTeName: [UIColor redColor] set the text color 4. NSParagraphStyleAttributEName: paragraph set paragraph style 5. NSMutableParagraphStyle * paragraph = [[using alloc] init]; paragraph. alignment = NSTextAlignmentCenter; 6. NSBackgroundColorAttribuTeName: [UIColor blackColor] set the background color 7. NSStrokeColorAttributeNaMe and NSStrokeWidthAttributeNaMe sets the stroke width to make the text hollow.
NSStrokeWidthAttributeNaThe value corresponding to the me attribute 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.
Two hollow attributes are set at the same time, and NSStrokeWidthAttributeNaIf the me attribute is set to an integer, the text foreground is ineffective.
Effect:
Effect:
8. NSStrikethroughStyleAttr Add strikethrough and strikethrough to ibuteName
Effect:
9. NSUnderlineStyleAttribut Underline eName
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. NSVerticalGlyphFormAttri ButeName
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. NSObliquenessAttributeNa Me sets the font skew. Skew
Effect:
13. NSExpansionAttributeName Set text flattening
Effect: