【发布时间】:2018-03-16 18:02:53
【问题描述】:
请问如何从objective-c 访问我的darkGray 颜色?
@objc
extension UIColor
{
@objc
public class Scheme1: NSObject {
static var darkGray: UIColor! {
return UIColor(red: 16.0/255.0, green: 16.0/255.0, blue: 19.0/255.0, alpha: 1.0)
}
}
}
【问题讨论】:
-
但是,你为什么要在 swift 扩展中使用objective-c?
标签: objective-c swift swift-extensions bridging