Advertisement
andreashorberg

Untitled

Jan 20th, 2017
763
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Swift 0.53 KB | None | 0 0
  1. func applicationWillResignActive(_ application: UIApplication) {
  2.     window?.addSubview(inactiveView)
  3.     window?.bringSubview(toFront: inactiveView)
  4. }
  5.  
  6. func applicationDidEnterBackground(_ application: UIApplication) {
  7.     window?.addSubview(backgroundView)
  8.     window?.bringSubview(toFront: backgroundView)
  9. }
  10.  
  11. func applicationWillEnterForeground(_ application: UIApplication) {
  12.     backgroundView.removeFromSuperview()
  13. }
  14.  
  15. func applicationDidBecomeActive(_ application: UIApplication) {
  16.     inactiveView.removeFromSuperview()
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement