In Objective-C we use to do it like this
+ (Class)layerClass { return [CAEAGLLayer class]; }
Obviously this won\'t work:
CA
Adapted from Apple's ListerKit sample code:
override class func layerClass() -> AnyClass { return CAEAGLLayer.self }
Update for Swift 3:
override class var layerClass: AnyClass { get { return CAGradientLayer.self } }