2
對於UILabel
,我可以設置系統字體爲:如何爲CATextLayer()設置系統字體?
label.font = UIFont.systemFontOfSize(18, weight: UIFontWeightMedium)
對於CATextLayer
,是不是也有類似的方式來設置系統字體,而不是直接給出字體的名字嗎?
textLayer = CATextLayer()
textLayer.font = ??? // instead of CTFontCreateWithName("HelveticaNeue-Bold", 18, nil)
使用'CTFontCreateUIFontForLanguage'並將'CTFontUIFontType'設置爲'System'? – juniperi