1
어떻게 스위프트에이 코드를 리팩토링 수 3?스위프트 3 해결되지 않은 식별자 CGColorGetComponents
extension UIColor {
var hexString: String {
// Produces "Use of unresolved identifier 'CGColorGetComponents'"
let components = CGColorGetComponents(self.cgColor)
....
}
}
이 엑스 코드 8 베타 4로 작동하지 않습니다하지만'cgColor.components'해야하는데 , 자세한 내용은 [이 Q & A를 참조하십시오] (http://stackoverflow.com/questions/38769322/xcode-8-beta-4-cgcolor-components-unavailable)를 참조하십시오. – Hamish
getRed 메소드 apple-reference-documentation을 사용할 수 있습니다. // hsPr9ZXOsl –