Brian Coyner 2/10/2018

Using NS_REFINED_FOR_SWIFT

Read Original

This technical article details a solution for bridging Objective-C methods that return NSInteger (like NSNotFound for errors) to Swift more elegantly. It demonstrates using the NS_REFINED_FOR_SWIFT macro to hide the original API and provide a Swifty wrapper that throws errors, improving code clarity and safety in mixed-language projects.

Using NS_REFINED_FOR_SWIFT

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser