A couple of months ago I mentioned an interesting library allowing you to easily define your own Objective-C literals that included a number of pre-made literals allowing you to dramatically reduce the size of your Objective-C code syntax. I also mentioned a nice collection of macros for shortening your code a couple of years back.
Here’s a library called Objective-Shorthand from Soroush Khanlou providing a number of categories to reduce the syntax when performing many common tasks.
Some of the categories included simplify:
– Regular Expressions: Pattern creation and match checking in a single step.
– JSON: A JSONKit style interface using Apple’s built-in JSON serializer.
– NSComparisonMethods: The Same API as in the OS X SDK with iOS Support for easier comparisons.
– Data Detection Methods: Check if Data is an E-mail, url, phone number, date or address.
– NSArray Convenience Methods: Make arrays unique, sort arrays
– Functional Collection Operators: Adds Map, Select and Any to NSArray, NSSet, NSDictionary
– String Methods: Check if contains, compare ignoring case
And much more – there is solid documentation for each method.
You can find Objective-Shorthand on Github here.
A very nice collection of categories.
Submit A Resource
Have you created a useful tutorial, library or tool for iOS development that you would like to get in front of our 300,000+ monthly page views from iOS developers?
You can submit the url here.
The resources we feel will appeal to our readers the most will be posted on the front page.