let paragraphStyle = NSMutableParagraphStyle()paragraphStyle.alignment = NSTextAlignment.leftlet messageText = NSMutableAttributedString( string: "1. Do not bully or target other users.\n2. Do not post others' private information.\n3. Do not post useless or offensive content.\n4. Do not post others' copyrighted content.\n5. DownVote and Flag posts which violate these rules.\n6. If you violate these rules,your account may be suspended and/or your content removed.",attributes: [ NSParagraphStyleAttributename: paragraphStyle,NSFontAttributename : UIFont(name: "Lato-Regular",size: 13.0)!,NSForegroundcolorAttributename : colorAccentWords ])
它给了我警报视图,如下所示:
我想要的是使编号列表保持预期,以便每行的溢出文本将保持对齐.我怎样才能做到这一点?
解决方法 例如,将paragraphStyle的headindent属性设置为适当的值paragraphStyle.headindent = 13.0总结
以上是内存溢出为你收集整理的Swift属于左侧预期编号列表全部内容,希望文章能够帮你解决Swift属于左侧预期编号列表所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)