I have a class Events
@interface MeEvents : NSObject {
NSString* name;**strong text**
NSString* location;
}
@property(nonatomic,retain)NSString* name;strong text
@property(nonatomic,retain)NSString* location;
In my NSMutablArray I add object of Events
Events* meEvent;
[tempArray addObject:meEvent];
Please tell me how to sort this array by member name.
The easiest way is to use
sortUsingComparator:like this:If you are sorting these strings because you want to show a sorted list to the user, you should
localizedCompare:instead:Or you might want to use
localizedCaseInsensitiveCompare:.