I'm making a split-view based iPad application(Portrait mode only), and I want to know how to recover initial state after viewDidUnload
is called.
When split-view application started for the first time,
-splitViewController:willHideViewController:withBarButtonItem:forPopoverController:
is called automatically (right after -viewDidLoad
).
I prepares UIBarButtonItems in the method.
If I open modal dialog or something with UIWebViewController
(it consumes a lot of memory), application receives memory warning, viewDidUnload
(s) are called.
When I close the modal dialog, -viewDidLoad is called automatically, but this time
-splitViewController:willHideViewController:withBarButtonItem:forPopoverController:
is not called.
I prepares UIBarButtonItems in
-splitViewController:willHideViewController:withBarButtonItem:forPopoverController:
but it is not called, so buttons are dismissed.
In that case, should I call the method manually?
I found similar posting here. https://github.com/grgcombs/IntelligentSplitViewController/issues/6
Thanks.