Re: Sorting Array Alphabetically
Re: Sorting Array Alphabetically
- Subject: Re: Sorting Array Alphabetically
- From: Shamyl Zakariya <email@hidden>
- Date: Fri, 13 Apr 2007 09:57:53 -0400
Look at NSMutableArray
- (void) sortUsingSelector:
- (void) sortUsingFunction:(int (*)(id, id, void *))compare context:
(void *)context
- (void) sortUsingDescriptors:(NSArray *)sortDescriptors
I think the first one will work the way you want by passing
NSString's compare:
Shamyl Zakariya
"there is no emoticon, for what I am feeling"
On Apr 13, 2007, at 8:53 AM, Micha Fuhrmann wrote:
Hi there!
I've looked around and couldn't find anything.
I've got a NSMutableArray with Strings in it. Po the Array in gdb
gives the list of it with the strings and not objects such as:
<NSCFArray 0x3a3e80>(
Nightmares On Wax,
John Martyn,
The Kinks,....
Now, I'd like to sort this Array Alphabetically, how do I go about?
Any help would be appreciated. Also, if I've missed something, like
NSMutableArray shouldn't be filled with plain strings but objects
in manner to give me more control please let me know.
Micha
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden