最近在整理一些資料,關(guān)于富文本也做了下整理。
NSFontAttributeName 設(shè)置字體大小和字體的類型 默認(rèn)12 Helvetica(Neue)
NSForegroundColorAttributeName 設(shè)置字體顏色,默認(rèn)黑色 UIColor對象
NSBackgroundColorAttributeName 設(shè)置字體所在區(qū)域的背景顏色,默認(rèn)為nil,透明色
NSLigatureAttributeName 設(shè)置連體屬性,NSNumber對象 默認(rèn)0 沒有連體
NSKernAttributeName 設(shè)置字符間距, NSNumber浮點(diǎn)型屬性 正數(shù)間距加大,負(fù)數(shù)間距縮小
NSStrikethroughStyleAttributeName 設(shè)置刪除線,NSNumber對象
NSStrikethroughColorAttributeName 設(shè)置刪除線顏色,UIColor對象,默認(rèn)是黑色
NSUnderlineStyleAttributeName 設(shè)置下劃線,NSNumber對象 NSUnderlineStyle枚舉值
NSUnderlineColorAttributeName 設(shè)置下劃線顏色,UIColor對象,默認(rèn)是黑色
NSStrokeWidthAttributeName 設(shè)置筆畫寬度,NSNumber對象 正數(shù)中空 負(fù)數(shù)填充
NSStrokeColorAttributeName 設(shè)置填充部分顏色,不是指字體顏色,UIColor對象
NSShadowAttributeName 設(shè)置陰影屬性,取值為NSShadow對象
NSTextEffectAttributeName 設(shè)置文本特殊效果 NSString對象 只有圖版印刷效果可用
NSBaselineOffsetAttributeName 設(shè)置基線偏移量,NSNumber float對象 正數(shù)向上偏移,負(fù)數(shù)向下偏移
NSObliquenessAttributeName 設(shè)置字體傾斜度,NSNumber float對象,正數(shù)右傾斜,負(fù)數(shù)左傾斜
NSExpansionAttributeName 設(shè)置文本橫向拉伸屬性,NSNumber float對象,正數(shù)橫向拉伸文本,負(fù)數(shù)壓縮
NSWritingDirectionAttributeName 設(shè)置文字書寫方向,從左向右或者右向左
NSVerticalGlyphFormAttributeName 設(shè)置文本排版方向,NSNumber對象。0 橫向排版,1 豎向排版
NSLinkAttributeName 設(shè)置文本超鏈接,點(diǎn)擊可以打開指定URL地址
NSAttachmentAttributeName 設(shè)置文本附件,取值為NSTextAttachment對象,一般為圖文混排
NSParagraphStyleAttributeName 設(shè)置文本段落排版,為NSParagraphStyle對象
未完。。。。下次繼續(xù)。
https://blog.csdn.net/Mazy_ma/article/details/52920596
http://www.itdecent.cn/p/e58eb77284d6
https://www.cnblogs.com/LynnAIQ/p/5920587.html
https://blog.csdn.net/deft_mkjing/article/details/52141936