【发布时间】:2015-07-24 21:22:14
【问题描述】:
我正在尝试创建一个显示随机著名历史名言的应用程序。我使用 UIlabel 随机显示数组中的引号。 但是对于长引号,它们看起来像这样:
http://i.stack.imgur.com/5j7at.png
代码如下:
var quoteArray: [String] = [
"We are not makers of history, we are made by history - Martin Luther King Jr",
"Without education you're not going anywhere in this world - Malcolm X"]
所以我从这个数组中随机选择,但我找不到在不破坏代码的情况下创建换行符的方法(因此可以看到整个引号)。 知道怎么做吗?
我应该从 UILabel 更改为其他东西吗? 或者有没有办法添加换行符
非常感谢
【问题讨论】: