需要为以下功能传递CGFont

CGFontCreateCopyWithVariations(<#font: CGFont!#>, <#variations: CFDictionary!#>))

最佳答案

这是一个小例子:

var font = UIFont.systemFontOfSize(15.0)
var fontName = font.fontName as NSString
var cgFont = CGFontCreateWithFontName(fontName);

var copiedFont = CGFontCreateCopyWithVariations(cgFont, nil)

10-06 13:04