date + 排序,

   notificationsArr =  [notificationsArr sortedArrayUsingComparator:^NSComparisonResult(id item1, id item2) {

        UILocalNotification *local1 = item1;

        UILocalNotification *local2 = item2;

        double one = [local1.fireDate timeIntervalSince1970];

        double two = [local2.fireDate timeIntervalSince1970];

            if (one > two) {

                returnNSOrderedDescending;

            } else if (one < two) {

                return NSOrderedAscending;

            } else {

                return NSOrderedSame;

            }

              

    }];

posted @ 2013-07-26 12:14  路在脚下,  阅读(255)  评论(0编辑  收藏  举报