iOS判斷手機APP第一次啟動
ios開發-判斷手機APP第一次啟動
代碼:
//判斷是不是第一次啟動if (![[NSUserDefaults standardUserDefaults]boolForKey:@"fristLaunch11"]) { [[NSUserDefaults standardUserDefaults]setBool:YES forKey:@"fristLaunch11"]; [[NSUserDefaults standardUserDefaults] synchronize]; //使啟動界面停留 2.0 秒 [NSThread sleepForTimeInterval:2.0]; userGuideViewController = [[UserGuideViewController alloc] init]; self.window.rootViewController = userGuideViewController;//設置啟動根視圖 [userGuideViewController release]; } else { [NSThread sleepForTimeInterval:2.0]; getPicViewController = [[GetPicViewController alloc] init]; self.window.rootViewController = getPicViewController; [getPicViewController release]; }</pre>
本文由用戶 iosbg 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!