For example, to increment an NSNumber value, the old syntax was this:
// Assume x is a pointer to NSNumber with a value already assigned. int tmpX = [x intValue]; x = [NSNumber numberWithInt:(tmpX + 1)];Now becomes this:
x = @([x intValue] + 1);I saw this on Stackoverflow, and as is usual on that site in regards to evolving technologies, an unpopular answer has the best info.
No comments:
Post a Comment