小编Sam*_*ams的帖子

在Swift中更改UIAlertAction的字体

此处已经回答了更改 UIAlertViewController对象的消息和标题的字体:如何在UIAlertController中更改UIAlertAction的字体大小和颜色.

但我想知道如何使用Swift更改UIAlertAction(iOS8 +)标题上的字体.不幸的是,UIAlertAction实例没有一个名为"attributionTitle"的属性,就像UIAlertController一样.

我要扩展以更改字体的代码如下:

let alertAction = UIAlertAction(title: "Got It!", style: .Default, handler: nil)
alertController.addAction(alertAction)
Run Code Online (Sandbox Code Playgroud)

任何想法将不胜感激.

fonts uialertaction

5
推荐指数
0
解决办法
782
查看次数

标签 统计

fonts ×1

uialertaction ×1