Reverse array

There are no reverse_array () obj-c function, but there is more awesome construction for it:

myNewArray = [[myArray reverseObjectEnumerator] allObjects];

This using objectEnumerator instance method that returns an NSEnumerator object that lets you access each object in the array.

Поделиться
Отправить
2013   Objective-C
Популярное