What is the order of didMoveToWindow for two views?

What is the calling order of didMoveToWindow for two views after switching between two ViewControllers.

In my project,we need get the property of view.window to prejucduce if the view is in the window,when one ViewController transform to another viewController。 We would like to know how this behavior is defined

If the window property of one view is set and the didmovetowindow method is called, is the window property of another view already set?

There is no documented defined ordering of when two arbitrary views will receive didMoveToWindow when they are moved around in the view hierarchy. This is mostly because the list of conditions is fairly complex and it is generally best for code to be defensive rather than to codify ordering expectations.

What is the order of didMoveToWindow for two views?
 
 
Q