【发布时间】:2019-09-05 13:35:11
【问题描述】:
如何在 UIActionSheet swift 中添加带有自定义字体的多行文本。我已经尝试过\n。但这不起作用。这是否可能。
这是我的代码。
alert.addAction(UIAlertAction(title: "line 1.\n %C line 2,\n %C line", style: .default , handler:{ (UIAlertAction)in
print("User click Approve button")
}))
alert.addAction(UIAlertAction(title: "Edit", style: .default , handler:{ (UIAlertAction)in
print("User click Edit button")
}))
alert.addAction(UIAlertAction(title: "Delete", style: .destructive , handler:{ (UIAlertAction)in
print("User click Delete button")
}))
alert.addAction(UIAlertAction(title: "Dismiss", style: .cancel, handler:{ (UIAlertAction)in
print("User click Dismiss button")
}))
self.present(alert, animated: true, completion: {
print("completion block")
})
【问题讨论】:
标签: swift xcode uialertview uiactionsheet nsobject