文本属性Attributes.docxVIP

  • 14
  • 0
  • 约 3页
  • 2017-03-29 发布于河南
  • 举报
文本属性Attributes

文本属性Attributes1.NSKernAttributeName:@10调整字句kerning字句调整2.NSFontAttributeName:[UIFontsystemFontOfSize:_fontSize]设置字体3.NSForegroundColorAttributeName:[UIColorredColor]设置文字颜色4.NSParagraphStyleAttributeName:paragraph设置段落样式5.NSMutableParagraphStyle*paragraph=[[NSMutableParagraphStylealloc]init];paragraph.alignment=NSTextAlignmentCenter;6.NSBackgroundColorAttributeName:[UIColorblackColor]设置背景颜色7.NSStrokeColorAttributeName设置文字描边颜色,需要和NSStrokeWidthAttributeName设置描边宽度,这样就能使文字空心.NSStrokeWidthAttributeName这个属性所对应的值是一个NSNumber对象(小数)。该值改变描边宽度(相对于字体size的百分比)。默认为0,即不改变。正数只改变描边宽度。负数同时改变文字的描边和填充宽度。例如,对于常见的空心字,这

文档评论(0)

1亿VIP精品文档

相关文档