You*_*sef 10 objective-c text-alignment uitextview uilabel ios
我正在研究Iphone应用程序,我需要显示一个大文本.我需要它有一个段落对齐.请参考下面的图片进行说明.
我试图使用UILabel和UITextView但无法找到属性来执行此操作.
谢谢你的帮助.

使用具有 UITextAlignmentJustify 的TTTAttributedLabel NSAtributedString 标签
yourTTTAttributedLabel.textAlignment = UITextAlignmentJustify;
Run Code Online (Sandbox Code Playgroud)
另一种选择是使用 OHAttributedLabel NSAtributedString 标签,它具有 UITextAlignmentJustify
yourOHAttributedLabel.textAlignment = UITextAlignmentJustify;
Run Code Online (Sandbox Code Playgroud)