美文网首页
09-30(初次使用软件时的登录界面的开发逻辑)

09-30(初次使用软件时的登录界面的开发逻辑)

作者: 绪雨成澜 | 来源:发表于2016-09-30 09:21 被阅读23次

在    AppDelegate.m    文件中:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];

[self.window makeKeyAndVisible];

//1.取出已存的账号,判断是否过期,是否仍然正确之类

BOAccount *account = [BOAccountTool readAccount];

if (account) {

HomeViewController *homeVC = [[HomeViewController alloc] init];

self.window.rootViewController = homeVC;

}else{//2.如果不存在,登陆

LoginViewController *loginVC = [[LoginViewController alloc] init];

self.window.rootViewController = loginVC;

}

return YES;

}

相关文章

网友评论

      本文标题:09-30(初次使用软件时的登录界面的开发逻辑)

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