如何在 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")
})
Run Code Online (Sandbox Code Playgroud)