裁剪的字符-iOS11-警报对话框 [英] Cropped characters - iOS11 - Alert Dialog
本文介绍了裁剪的字符-iOS11-警报对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
已裁剪的字符-iOS11-警报对话框. 如何解决?
Cropped characters - iOS11 - Alert Dialog. How to fix it?
[
func settingsButtonPressed() {
let alert = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet)
let closeAction = UIAlertAction(title: "Anuluj", style: .cancel) { (action) in
//do nothing
}
alert.addAction(closeAction)
let restorePurchases = UIAlertAction(title: "Przywróć zakupy", style: .default) { (action) in
self.restorePurchases()
}
alert.addAction(restorePurchases)
let refreshCatalogs = UIAlertAction(title: "Odśwież", style: .default) { (action) in
self.collectionView.reloadData()
}
alert.addAction(refreshCatalogs)
let delPubs = UIAlertAction(title: "Usuń publikacje", style: .destructive) { (action) in
self.deletePublications()
}
alert.addAction(delPubs)
present(alert, animated: true, completion: nil)
}
推荐答案
尝试使用NSLocalizedString
而不是硬编码值. 在此处使用文章.
Try to use NSLocalizedString
instead of hardcoded values. Usage article here.
然后只需这样定义标题:
Then just define your titles like that:
let cancelButtonText = NSLocalizedString("Cancel", comment: "")
并设置它:
let cancelAction = UIAlertAction(title: cancelButtonText, style: .cancel, handler: nil)
这篇关于裁剪的字符-iOS11-警报对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文