【发布时间】:2014-10-21 14:09:18
【问题描述】:
我想改变 UIBarButtonItem.title 的大小,我在下面使用了 2 个不同的代码行:
let font = UIFont(name:"Arial", size: 8)
newBarButtonItem.setTitleTextAttributes([NSFontAttributeName:font],forState: UIControlState.Normal)
newBarButtonItem.setTitleTextAttributes([NSFontAttributeName:UIFont(name:"Arial", size: 8)],forState: UIControlState.Normal)
当我运行应用程序时,按钮标题不会改变。任何人都可以帮我解决这个问题。谢谢
【问题讨论】: