• 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;

                }

                  

        }];

  • 相关阅读:
    萨卡斯指法
    香港保险
    数据分析,了解行业
    数据分析师
    黑盒测试方法
    web系统的常用功能测试
    linux-磁盘问题
    mysql连表查询
    mysql模糊查询
    MySQL 数据类型
  • 原文地址:https://www.cnblogs.com/guligei/p/3216824.html
Copyright © 2020-2023  润新知