Cropped characters - iOS11 - Alert Dialog

前端 未结 1 1288
無奈伤痛
無奈伤痛 2021-01-17 00:58

Cropped characters - iOS11 - Alert Dialog. How to fix it?

[\"Example]\"


func settingsBut         


        
1条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-17 01:31

    Try to use NSLocalizedString instead of hardcoded values. Usage article here.

    Then just define your titles like that:

    let cancelButtonText = NSLocalizedString("Cancel", comment: "")
    

    And set it:

    let cancelAction = UIAlertAction(title: cancelButtonText, style: .cancel, handler: nil)
    

    0 讨论(0)
提交回复
热议问题