Guest User

Untitled

a guest
Jun 22nd, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. let current = UNUserNotificationCenter.current();
  2.  
  3. current.getNotificationSettings(completionHandler:
  4. {
  5. (settings) in
  6.  
  7. if settings.authorizationStatus == .notDetermined
  8. {
  9. // self.window = UIWindow(frame: UIScreen.main.bounds);
  10. self.window = UIWindow(frame: UIScreen.main.bounds)
  11.  
  12. let aViewController = AViewController();
  13.  
  14. self.window?.rootViewController = aViewController;
  15.  
  16. self.window?.makeKeyAndVisible();
  17. }
  18. else
  19. {
  20. // self.window = UIWindow(frame: UIScreen.main.bounds);
  21. self.window = UIWindow(frame: UIScreen.main.bounds)
  22.  
  23. let bViewController = BViewController();
  24.  
  25. self.window?.rootViewController = bViewController;
  26.  
  27. self.window?.makeKeyAndVisible();
  28. }
  29. });
  30.  
  31. // Override point for customization after application launch.
  32.  
  33. return true
  34. }
Add Comment
Please, Sign In to add comment