Being able to log information about data types at runtime can greatly aid in debugging and tweaking your apps. With Objective-C you’ll typically doing this with the NSLog statement, unfortunately this can lead to crashes when trying to log non-Objective-C objects such as C strings.
I found out about a very useful macro that allows you to log meaningful information about nearly any type. It is especially good for scalar expressions at runtime. In fact the author even calls it the most useful code he’s ever written.
You can find the macro and more details on Vince Gable’s blog at:
The Most Useful Code I’ve Ever Written
Thanks for reading, please share this using the buttons below!
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.