Describe the lifecycle of a UIViewController and tell me which event is called before a UIViewController is displayed on screen.
Implement a validator for an observed callback sequence. Return whether the sequence follows the expected UIKit order and identify viewWillAppear as the pre-display event when it occurs.
Use analyze_view_controller_lifecycle(events), where events is a list of callback names and the result is a dictionary containing valid and before_display.
loadView, viewDidLoad, viewWillAppear, viewWillLayoutSubviews, viewDidLayoutSubviews, viewDidAppear, viewWillDisappear, viewDidDisappearloadView and viewDidLoad may occur at most once and must appear togetherdef analyze_view_controller_lifecycle(events):