【问题标题】:Swift 4 - \n not working. How can I make this to another line. [duplicate]斯威夫特 4 - \n 不工作。我怎样才能把它变成另一条线。 [复制]
【发布时间】:2018-10-12 02:12:54
【问题描述】:
var welcomeText: UITextField = {
    let textField = UITextField()
    textField.layer.cornerRadius = 25
    textField.text = "Hello, are you \n Im doing good! ????"
    textField.textColor = .white
    return textField
}()

我想不通。任何帮助将不胜感激!

【问题讨论】:

    标签: ios swift uitextfield


    【解决方案1】:

    UITextField 只能显示一行。如果您想要多行可编辑文本,则必须改用UITextView

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-01-28
      • 1970-01-01
      • 2023-03-19
      • 1970-01-01
      • 1970-01-01
      • 2016-06-16
      • 2016-02-16
      • 2016-12-27
      相关资源
      最近更新 更多