Instance Method

sceneDidBecomeActive(_:)

Tells the delegate that the scene became active and is now responding to user events.

Declaration

optional func sceneDidBecomeActive(_ scene: UIScene)

Parameters

scene

The scene that became active and is now responding to user events.

Discussion

Use this method to prepare your scene to be onscreen. UIKit calls this method after loading the interface for your scene, but before that interface appears onscreen. Use it to refresh the contents of views, start timers, or increase frame rates for your UI.

In addition to calling this method, UIKit also posts a didActivateNotification notification. For more information on what to do when your app becomes active, see Preparing Your UI to Run in the Foreground.

See Also

Transitioning to the Foreground

func sceneWillEnterForeground(UIScene)

Tells the delegate that the scene is about to begin running in the foreground and become visible to the user.