Contents

applicationDidBecomeActive(_:)

Tells the delegate that the app has become active.

Declaration

optional func applicationDidBecomeActive(_ application: UIApplication)

Parameters

  • application:

    Your singleton app object.

Discussion

UIKit calls this method to let your app know that it moved from the inactive to active state. The app moves to the active state because it was launched by the user or the system, or because the user ignores an interruption (like an incoming phone call or SMS message) that sent the app temporarily to the inactive state.

Use this method to restart any tasks that were paused (or not yet started) while the app was inactive. For example, use it to restart timers or throttle up OpenGL ES frame rates. If your app was previously in the background, you can also use it to refresh your app’s user interface.

After calling this method, UIKit posts a didBecomeActiveNotification to give interested objects a chance to respond to the transition.

See Also

Responding to app life-cycle events