func viewDidAppear (Bool)
Notifies the view controller that its view has been added to a view hierarchy.
func viewWillDisappear (Bool)
Notifies the view controller that its view will be removed from a view hierarchy.
Availability 有効性
Technology
override dynamic func viewWillAppear(_ animated: Bool
)
animated
If true
, the view is being added using an animation.
SwiftUI calls this method before adding the hosting controller’s root view to the view hierarchy. You can override this method to perform custom tasks associated with the appearance of the view. If you override this method, you must call super
at some point in your implementation.
func viewDidAppear (Bool)
func viewWillDisappear (Bool)