Thursday, May 28, 2015

[Swift] Hello World Primus with Swift via ActionHeroJS

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: