代码如下
if(NSUserDefaults.standardUserDefaults().boolForKey("HasLaunchedOnce")) { // app already launched //非首次登陆 } else { // This is the first launch ever //首次登陆 NSUserDefaults.standardUserDefaults().setBool(true, forKey: "HasLaunchedOnce") NSUserDefaults.standardUserDefaults().synchronize() }新闻热点
疑难解答