Thursday, December 10, 2015 [Tweets] [Favorites]

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

Stay up-to-date by subscribing to the Comments RSS Feed for this post.

Leave a Comment