Thursday, December 10, 2015

Improving Readabilty With Swift Extensions

Jacob Bandes-Storch:

One perk of being a programmer is that, if your tools don’t do what you want, you can improve them yourself. Swift makes this particularly easy, providing several features which enable you to extend and customize the language in a way that feels natural.

Unlike Objective-C categories, Swift extensions let you extend C types like CGContext and dispatch_queue_t.

If your project has both Objective-C and Swift, you may encounter an awkward moment when an Obj-C API just doesn’t feel Swifty enough. NS_REFINED_FOR_SWIFT to the rescue.

Comments RSS · Twitter

Leave a Comment