码迷,mamicode.com
首页 > 其他好文 > 详细

版本号的获取以及新特性

时间:2015-02-03 18:50:21      阅读:155      评论:0      收藏:0      [点我收藏+]

标签:

 NSString * key = (__bridge NSString *) kCFBundleVersionKey;

         /// 当前软件的版本号

    NSString * currentVersion = [NSBundle mainBundle].infoDictionary[key];

        //、 沙河中的版本号

    NSUserDefaults * defaults = [NSUserDefaults standardUserDefaults];

    NSString * sandBoxVersion = [defaults stringForKey:key];

         /// 比较版本号

    if ([currentVersion  compare:sandBoxVersion] == NSOrderedDescending) {

        /// 存储当前软件版本号

        [defaults setObject:currentVersion forKey:key];

        [defaults synchronize];

        self.window.rootViewController = [[LLNewfeatureViewController alloc]init];

    }else

    {

        self.window.rootViewController = [[LLTabbarViewController alloc]init];

  

    }

 

版本号的获取以及新特性

标签:

原文地址:http://www.cnblogs.com/angongIT/p/4270323.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!