Actually, your category is transtlated to Swift as follows:
extension UIColor {
init(hex hexInt: Int) -> UIColor
init(hexString: String) -> UIColor
}
And because of that, you should be using:
let color = UIColor(hex: 0xffffff) // instead of hexInt:
let color = UIColor(hexString: "ffffff")
Autocompletion may still be buggy in the beta software, though.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…