开发者

Objective c date sorting [closed]

开发者_开发问答 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 10 years ago.

I am developing a iphone application. I want to sort the following dates. also I use a marker with dates. Markers are important for me Because I use for other a process. Please help me

NSMutableDictionary *myDate=[NSMutableDictionary dictionary];
[myDate setObject:@"00" forKey:@"2011-08-02"];
[myDate setObject:@"01" forKey:@"2011-07-09"];
[myDate setObject:@"KUP" forKey:@"2011-06-07"];


if you want to sort date covert them in YYYYMMDD and sort them as integer You can convert them by using NSDateFormat

Hope it helps...


NSDictionaries are not sortable directly, but this answer should help: Sorting NSDictionary

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜