为什么文本在我的整个应用程序中以单行显示
let alert = UIAlertController(title: "PayPal", message: "With PayPal processing fee total amount is . Do you want to proceed?", preferredStyle: .alert)
alert.addAction(UIAlertAction(title: "Yes", style: UIAlertActionStyle.default, handler: { (action: UIAlertAction!) in
}))
alert.addAction(UIAlertAction(title: "No", style: UIAlertActionStyle.default, handler: { (action: UIAlertAction!) in
}))
self.present(alert, animated: true, completion: nil)
很可能这个问题的原因是你在代码中覆盖了UILabel
属性。当你删除该代码时,它肯定有效。
如果您不覆盖它,请在您的pod文件中搜索以下内容。可能是某些pod文件覆盖UILabel
属性供其使用。
extension UILabel {
...
override open func draw(_ rect: CGRect) { ... }
override open var intrinsicContentSize: CGSize { ... }
...
}