本文介绍了快速对齐文本视图中的文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我知道这是一个非常琐碎的问题,但是我必须能够使用swift对齐文本视图中的文本.这是情节提要上已经存在的文本视图,已连接到插座,我们称之为justifyTextView
.
It's a pretty trivial question I know, but I have to be able to justify-align the text in a text view using swift. It is an already existing text view on the storyboard which has been hooked up to an outlet, let's call it justifyTextView
.
有人可以为此提供一些代码吗?我似乎在网上找不到任何东西.
Can anybody give some code for this? I can't seem to find anything online about it.
推荐答案
label.textAlignment = NSTextAlignment.Justified
这篇关于快速对齐文本视图中的文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!