userDefaults相关

2015-12-10  本文已影响0人  必须这么打

判断用户是否第一次登录

if (![[NSUserDefaults standardUserDefaults] valueForKey:@"isFirst"]) {
   AppGuidViewController *appGuid = [[AppGuidViewController alloc] initWithImageArray:@[@"guies01",@"guies02",@"guies03"] startBtnDistanceWithBottomArray:@[@70,@100,@110,@120] needLoadVC:self.viewController];
      self.window.rootViewController = appGuid;
        [[NSUserDefaults standardUserDefaults] setValue:@"YES" forKey:@"isFirst"];
    }else{
      self.window.rootViewController = self.viewController;
    }
   return YES;
[button removeFromSuperview];
 [writeButton removeFromSuperview];
 [ll removeFromSuperview];
    if ([[NSUserDefaults standardUserDefaults] objectForKey:@"isLogin"]) {
        // 登陆后的页面效果
        [self loginBtn2];
}else{
        [self loginBtn];
           }
上一篇 下一篇

猜你喜欢

热点阅读