UItextView Justify Paragraph in Iphone

 ̄綄美尐妖づ 提交于 2019-12-11 14:46:01

问题


I want to justify a paragraph using UITextView in an iPhone using xCode.

What property should I change to do this.

Thanks In Advance


回答1:


Photo says it all. You could use the Alignment control to left, center or right justify text.

By the way this is got when you go to Interface builder, select that UItextView & then set these properties...

From code you could do - [yourTextView setTextAlignment:<#(UITextAlignment)#>




回答2:


The correct way To justify a paragraphy is:

    YOURTEXTVIEW.textAlignment = NSTextAlignmentJustified;


来源:https://stackoverflow.com/questions/6995903/uitextview-justify-paragraph-in-iphone

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!