时间加减比较

2014-12-21 0 265
时间加减比较
 NSDate *update = [[NSUserDefaults standardUserDefaults] objectForKey:APP_UPDATE_TIME];
                    CGFloat dayDifference;
                    if (update) {
                        dayDifference = [[NSDate date] timeIntervalSinceDate:update]/ 60.0/60.0/24.0;
                    }
                    if (!update || dayDifference > 2) {
                        UIAlertView *alert = [[UIAlertView alloc] initWithTitle:[NSString stringWithFormat:@"更新提示V%@",systemVersionNo] message:config[@"releaseNotes"] delegate:self cancelButtonTitle:@"稍后升级" otherButtonTitles:@"立即更新", nil];
                        [alert show];
                    }

遇见资源网 objective-c 时间加减比较 http://www.ox520.com/15578.html

下一篇: 音乐播放器
常见问题

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务