ViewWillAppear does not receive a call for detailView UISplitViewController

I am experimenting with splitViewController introduced for iPads and stuck in point. I have a button on my detailed view of splitViewController, clicking on which opens a modal view. Now I want to change the positioning of the user interface controls in the detail view when the modal view is diffuse.

A pretty obvious way to do this would be to catch a view transition in the ViewWillAppear method for detailView. But this is not called in this case. I remember that I encountered the same problem in tabBarController, where [tabBarController viewWillAppear: animated] had to be set before the ViewWillAppear view in each tab called. I tried to do this using splitViewController, but this does not seem to work.

Any ideas?

+3
source share
1 answer

If positioning is required due to the action that occurred in the modal representation, you should use the explicit delegate callback. This will allow you to clearly define the control flow and the resulting behavior of your application.

, , . , ( , , ).

, , UIAlertViewDelegate. alertViewCancel:, , alertView:didDismissWithButtonIndex:, .

.

, , , , , - .

+2

Source: https://habr.com/ru/post/1762598/


All Articles