设为首页 加入收藏

TOP

iOS使用NSMutableAttributedString实现富文本小结(二)
2019-08-26 07:01:16 】 浏览:62
Tags:iOS 使用 NSMutableAttributedString 实现 文本 小结
ue是UIFont对象
NSParagraphStyleAttributeName 绘图的风格(居中,换行模式,间距等诸多风格),value是NSParagraphStyle对象
NSForegroundColorAttributeName 文字颜色,value是UIColor对象
NSLigatureAttributeName 字符连体,value是NSNumber
NSKernAttributeName 字符间隔
NSStrikethroughStyleAttributeName 删除线,value是NSNumber
NSUnderlineStyleAttributeName 下划线,value是NSNumber
NSStrokeColorAttributeName 描绘边颜色,value是UIColor
NSStrokeWidthAttributeName 描边宽度,value是NSNumber
NSShadowAttributeName 阴影,value是NSShadow对象
NSTextEffectAttributeName 文字效果,value是NSString
NSAttachmentAttributeName 附属,value是NSTextAttachment 对象
NSLinkAttributeName 链接,value是NSURL or NSString
NSBaselineOffsetAttributeName 基础偏移量,value是NSNumber对象
NSStrikethroughColorAttributeName 删除线颜色,value是UIColor
NSObliquenessAttributeName 字体倾斜
NSExpansionAttributeName 字体扁平化
NSVerticalGlyphFormAttributeName 垂直或者水平,value是 NSNumber,0表示水平,1垂直

富文本段落排版格式属性说明

属性 说明
lineSpacing 字体的行间距
firstLineHeadIndent 首行缩进
alignment (两端对齐的)文本对齐方式:(左,中,右,两端对齐,自然)
lineBreakMode 结尾部分的内容以……方式省略 ( "...wxyz" ,"abcd..." ,"ab...yz")
headIndent 整体缩进(首行除外)
minimumLineHeight 最低行高
maximumLineHeight 最大行高
paragraphSpacing 段与段之间的间距
paragraphSpacingBefore 段首行空白空间
baseWritingDirection 书写方向(一共三种)
hyphenationFactor 连字属性 在iOS,唯一支持的值分别为0和1



作者:coder小鹏

首页 上一页 1 2 下一页 尾页 2/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇ios 开发UI篇—UITextView 下一篇苹果电脑(Mac mini或Macbook或iM..

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目