Alex Rivera | Logout

Reverse NSMutableArray

Asked 2011-02-28T00:05:58.260
42

What is the best/correct way to reverse an NSMutableArray?

Edit
Report

1 Answer

0

you can reverse nsmutablearray with the help of reverseObjectEnumerator. It will return you nsarray then you should create a nsmutablearray with the help of this nsarray

NSArray* reversedArray = [[TableDataArr reverseObjectEnumerator] allObjects];
TableDataArr = [NSMutableArray arrayWithArray:reversedArray];
answered 2012-07-09T13:05:44.837

Your Answer