我需要在新行中添加操作,就像这样:alertActionsWithNewLines
我正在尝试这段代码:
let uncheckInAlert = UIAlertController(title: "Are you sure you want to uncheck-in?", message: "", preferredStyle: .alert)
uncheckInAlert.setTitleImage(UIImage(named: "fail_Icon"))
uncheckInAlert.addAction(UIAlertAction(title: "Yes", style: .default, handler: { (action) -> Void in
self.userUncheckIn()
}))
uncheckInAlert.addAction(UIAlertAction(title: "Cancel", style: .cancel, handler: nil))
self.present(uncheckInAlert, animated: true, completion: nil)
但是结果我得到了这样的东西:alertActionsInOneLine。如果操作标题很长,则操作会自动移到新行上。对于较小的操作标题,操作将分组在一行中。有没有什么方法可以做到这一点?
" Yes "
. - rmaddy