【发布时间】:2014-11-06 10:31:50
【问题描述】:
我正在尝试更改使用 UIAlertController 显示的警报的标题和消息字体 我正在尝试使用 NSAttributedStirng,但它给出了编译器错误,即不能采用 NSAttributed 字符串而不是 Stirng 我尝试了类似于this
var title_attrs = [NSFontAttributeName : CustomFonts.HELVETICA_NEUE_MEDIUM_16]
var msg_attrs = [NSFontAttributeName : CustomFonts.HELVETICA_NEUE_REGULAR_14]
var title = NSMutableAttributedString(string:"Done", attributes:title_attrs)
var msg = NSMutableAttributedString(string:"The job is done ", attributes:msg_attrs)
let alertController = UIAlertController(title: title, message: title , preferredStyle: UIAlertControllerStyle.Alert)
有人可以指导我如何实现这一目标吗?
【问题讨论】:
标签: swift ios8 uialertcontroller