So I have a custom class Foo
that has a number of members:
@interface Foo : NSObject {
NSString *title;
BOOL taken;
NSDate *dateCr
That's quite simple to do.
First, in your Foo object, create a method
- (NSComparisonResult) compareWithAnotherFoo:(Foo*) anotherFoo;
Which will return
[[self dateCreated] compare:[anotherFoo dateCreated]];
In the end, call on the array
[yourArray sortUsingSelector:@selector(compareWithAnotherFoo:)];
Hope this helps, Paul