[attributedString addAttributes:attributeds range:range]; if ([attributeds objectForKey:@"NSParagraphStyle "]) { NSMutableParagraphStyle * paragraphStyle = [attributeds objectForKey:@"NSParagraphStyle
2> NSParagraphStyleAttributeName(段落) 该属性所对应的值是一个 NSParagraphStyle 对象。该属性在一段文本上应用多个属性。 如果不指定该属性,则默认为 NSParagraphStyle 的defaultParagraphStyle 方法返回的默认段落属性。
inRange:range \ options:kNilOptions \ usingBlock: ^(NSParagraphStyle (__bridge CFTypeRef)(value)) == CTParagraphStyleGetTypeID()) { \ value = [NSParagraphStyle value.mutableCopy; \ } \ } else { \ if ([NSParagraphStyle _attr_ == _attr_) return; \ style = [NSParagraphStyle defaultParagraphStyle].mutableCopy
NSParagraphStyleAttributeName]; [attrStr addAttributes:attributes range:NSMakeRange(0, attrStr.length)]; // NSParagraphStyle
Attributes 1.直接上干货,多个属性可以一同使用 //NSFontAttributeName 字号 UIFont 默认12 //NSParagraphStyleAttributeName 段落样式 NSParagraphStyle
设置文本附件,取值为NSTextAttachment对象,常用于文字图片混排 NSParagraphStyleAttributeName 设置文本段落排版格式,取值为 NSParagraphStyle
if (systemVersion >= 11.0) { NSParagraphStyle *alternativeParagraphStyle = [mutableCalcAttributedString
NSFontAttributeName; 字体 对应一个 UIFont 对象 NSString *const NSParagraphStyleAttributeName; 段落 对应的值是一个NSParagraphStyle
设置文本附件,取值为NSTextAttachment对象,常用于文字图片混排 NSParagraphStyleAttributeName 设置文本段落排版格式,取值为 NSParagraphStyle
473 474 2> NSParagraphStyleAttributeName(段落) 475 476 该属性所对应的值是一个 NSParagraphStyle 对象。 如果不指定该属性,则默认为 NSParagraphStyle 的defaultParagraphStyle 方法返回的默认段落属性。
:对于某种排版的临时字符属性,不会持久化,比如说跨行的连字符'-'; paragraph attributes:行间距、段间距、边界margin等段落属性,段落属性会影响多行文本的排版,具体属性可以见NSParagraphStyle
你当前无法创建对以下类的实例的weak弱引用:NSATSTypesetter、NSColorSpace、NSFont、NSMenuView、NSParagraphStyle、NSSimpleHorizontalTypesetter