在alertcontroller中更改消息和标题字体

时间:2018-06-07 08:18:52

标签: ios swift xcode uialertcontroller uifont

我的应用程序中有一个alertController,如下所示:

    let alertController = UIAlertController(title: "Title", message: NSLocalizedString("nodays", comment: "-")
            , preferredStyle: UIAlertControllerStyle.alert)
        alertController.addAction(UIAlertAction(title: NSLocalizedString("ok", comment: "-"), style: UIAlertActionStyle.cancel,handler: nil))
        alertController.view.tintColor = UIColor(red:0.52, green:0.77, blue:0.33, alpha:1.0)
        self.present(alertController, animated: true, completion: nil)

我想将消息和操作字体更改为:

 UIFont(name: "GESSTwoMedium-Medium", size: 17)

怎么做?

0 个答案:

没有答案