设置任何界面下的电池栏前景颜色都是白色
application.setStatusBarStyle(.LightContent, animated: true)
参考文章:
http://beyondvincent.com/2013/11/03/2013-11-03-120-customize-navigation-status-bar-ios-7/
alertTitleLabel.font = self.alertTitleLabelFont()
let mstr = NSMutableAttributedString(string: alertTitleLabel.text!)
let par = NSMutableParagraphStyle()
par.alignment = .Justified
par.lineSpacing = 6
let dict = [NSParagraphStyleAttributeName:par,
NSFontAttributeName:self.alertContentLabelFont(),
NSUnderlineStyleAttributeName:NSNumber.init(integer: NSUnderlineStyle.StyleNone.rawValue)]
//Cannot convert value of type 'NSUnderlineStyle' to expected argument type 'Int' --->用rawValue 解决枚举转Int
mstr.addAttributes(dict, range: NSMakeRange(0, mstr.length))
alertContentLabel.attributedText = mstr
label文章左右对齐
http://www.jianshu.com/p/38a6fd46fb9c
http://www.jianshu.com/p/06722622073b
IOS集成第三方TTF字体库
参考文章:
http://www.jianshu.com/p/7979cc606bd5
网友评论