Pretty much same as Objective-C implement nothing to special, just this fancy block...
class Block<T> { let f : T init (_ f: T){ self.f = f } var casted: AnyObject { get { return unsafeBitCast(f, AnyObject.self) } } }
Which I can't find shorter way yet
Happy Coding!
No comments:
Post a Comment