博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

2011年12月26日

摘要: 1. Either you implement a compare-method for your object:- (NSComparisonResult)compare:(Person *)otherObject { return [self.birthDate compare:otherObject.birthDate]; } NSArray *sortedArray = [drinkDetails sortedArrayUsingSelector:@selector(compare:)]; 2. or usually even better: (The default sorti... 阅读全文
posted @ 2011-12-26 21:59 Likwo 阅读(574) 评论(0) 推荐(0)