酷店

AppDelegate.m 2.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. //
  2. // AppDelegate.m
  3. // KuDianProject
  4. //
  5. // Created by 学丽 on 2019/7/4.
  6. // Copyright © 2019 KDP. All rights reserved.
  7. //
  8. #import "AppDelegate.h"
  9. #import "KDPTabBarVC.h"
  10. #import "KDPAccountTool.h"
  11. #import "KDPWelcomePageViewController.h"
  12. @interface AppDelegate ()
  13. @end
  14. @implementation AppDelegate
  15. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
  16. self.window=[[UIWindow alloc]initWithFrame:[UIScreen mainScreen].bounds];
  17. self.window.backgroundColor=[UIColor whiteColor];
  18. self.window.rootViewController=[[KDPTabBarVC alloc]init];
  19. [self.window makeKeyAndVisible];
  20. if (![KDPAccountTool isLogin]) {
  21. [self.window.rootViewController presentViewController:[[UINavigationController alloc]initWithRootViewController:[[KDPWelcomePageViewController alloc]init]] animated:YES completion:nil];
  22. }
  23. return YES;
  24. }
  25. - (void)applicationWillResignActive:(UIApplication *)application {
  26. // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
  27. // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
  28. }
  29. - (void)applicationDidEnterBackground:(UIApplication *)application {
  30. // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
  31. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
  32. }
  33. - (void)applicationWillEnterForeground:(UIApplication *)application {
  34. // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
  35. }
  36. - (void)applicationDidBecomeActive:(UIApplication *)application {
  37. // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
  38. }
  39. - (void)applicationWillTerminate:(UIApplication *)application {
  40. // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
  41. }
  42. @end