UIFont(name: "PingFangSC-Semibold", size: 16)
//精选动态label
lazy var headLabel:UILabel = {
let attributedString = NSAttributedString(string: "精选动态", attributes: [NSAttributedString.Key.font : UIFont(name: "PingFangSC-Semibold", size: 16),NSAttributedString.Key.foregroundColor:UIColor.hexColor(hexValue: 0x292929)])
let label = UILabel()
label.attributedText = attributedString
return label
}()
2.在storyboard中的设置
细体 - PingFangSC-Light中黑体 - PingFangSC-Medium常规体 - PingFangSC-Regular中粗体 - PingFangSC-Semibold纤细体 -PingFangSC-Ultralight极细体 - PingFangSC-Thin参考博客
iOS-PingFangSC字体
字体的不同粗细型号怎么认?
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)