Converting an integer in a string into an NSNumber

March 10, 2013 in iOS Snippets

This new idiom is concise and clean:

NSNumber* intNumber = @([str intValue]);