I have an array of NSString, I want to move a particu开发者_C百科lar NSString onto zero index of that array. I am getting values into array after sorting it.
How can I implement it?
You can use exchangeObjectAtIndex:withObjectAtIndex:
method if you want to swap two strings in the mutable array.
Have a look at -[NSArray sortedArrayUsingComparator:]
and -[NSMutableArray insertObject:atIndex:]
.
精彩评论