user3172841
user3172841

Reputation: 73

xcode > reorganise Mutable array values

I am new to Xcode and i have created a NSmutableArray that retrieves its values from a function. i would like to able to re organise the contents of my Array

When i output my array, i get the following results

(value A,value B,value C,value D)

I would like to re organize my array to appear a customised way so i would like it to appear in the following way

(value B,value D,value A,value C)

Any ideas on how to acheve this ?

I am using xcode 4.6.2

Upvotes: 0

Views: 55

Answers (1)

prashant
prashant

Reputation: 1920

User can see the custom order and sorted order. right?

Have a NSMutableArray. Organise the content and Iterate to show it in UITableview

When you want to show sorted content in UITableView use the below method to get the sorted array.

-(NSMutableArray *)mySortedArray
{
 return [myArray sortedArrayUsingSelector:@selector(localizedCaseInsensitiveCompare:)];
}

Upvotes: 1

Related Questions