美文网首页
判断新手界面第一次显示,第二次以上不显示

判断新手界面第一次显示,第二次以上不显示

作者: 法库德 | 来源:发表于2017-09-22 07:57 被阅读0次

//获取单列对象

NSUserDefaults *use=[NSUserDefaults standardUserDefaults];

//通过单列

BOOL isopened=[use boolForKey:@"a"];

if (isopened ==YES)

{

//直接进入到主页面或登录页面

Diyige * a=[[Diyige alloc]init];

UINavigationController *nav=[[UINavigationController alloc]initWithRootViewController:a];

self.window.rootViewController=nav;

}

else

{

//进入新手页面

ViewController *vi=[[ViewController alloc]init];

UINavigationController *nav=[[UINavigationController alloc]initWithRootViewController:vi];

self.window.rootViewController=nav;

//通过单列对象 赋值

[use setBool:YES forKey:@"a"];

}

相关文章

网友评论

      本文标题:判断新手界面第一次显示,第二次以上不显示

      本文链接:https://www.haomeiwen.com/subject/lwyxextx.html