iOS 富文本所有的NSAttributedStringKey


NSAttributedStringKey:

 1 NSFontAttributeName; //字體,value是UIFont對象
 2 NSParagraphStyleAttributeName;//繪圖的風格(居中,換行模式,間距等諸多風格),value是NSParagraphStyle對象
 3 NSForegroundColorAttributeName;// 文字顏色,value是UIFont對象
 4 NSBackgroundColorAttributeName;// 背景色,value是UIFont
 5 NSLigatureAttributeName; //  字符連體,value是NSNumber
 6 NSKernAttributeName; // 字符間隔
 7 NSStrikethroughStyleAttributeName;//刪除線,value是NSNumber
 8 NSUnderlineStyleAttributeName;//下划線,value是NSNumber
 9 NSStrokeColorAttributeName; //描繪邊顏色,value是UIColor
10 NSStrokeWidthAttributeName; //描邊寬度,value是NSNumber
11 NSShadowAttributeName; //陰影,value是NSShadow對象
12 NSTextEffectAttributeName; //文字效果,value是NSString
13 NSAttachmentAttributeName;//附屬,value是NSTextAttachment 對象
14 NSLinkAttributeName;//鏈接,value是NSURL or NSString
15 NSBaselineOffsetAttributeName;//基礎偏移量,value是NSNumber對象
16 NSUnderlineColorAttributeName;//下划線顏色,value是UIColor對象
17 NSStrikethroughColorAttributeName;//刪除線顏色,value是UIColor
18 NSObliquenessAttributeName; //字體傾斜
19 NSExpansionAttributeName; //字體扁平化
20 NSVerticalGlyphFormAttributeName;//垂直或者水平,value是 NSNumber,0表示水平,1垂直

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM