My app uses storyboard with a splitviewcontroller. On the left side I have tableview with a list of options. On the right side I have some information for the options on the left side. Just as in the settings app. When the user choose an option on the left side the content of the right side changes. There are one viewcontroller for every one of the options on the left side. These viewcontrollers are embedded inside a navigationviewcontroller (one navigationviewcontroller for every viewcontroller).
When the user select an option on the left side a segue is performed. Its type is "Replace" and its destination "Detail Split".
My problem is that every time the user select an option on the left side, viewWillDisappear of the rightside viewcontroller is called twice. Why is it happening?
I had this as well, turned out my problem was that I was calling the wrong super method, in my case calling [super viewDidAppear:animated] inside the - (void)viewDidDisappear:(BOOL)animated method in the method I was overriding. Probably not your issue, but just in case someone stumbles on this one day.
First, let me say, this sucks. I ran into this problem as well and found your post. After experimentation, we realized that -viewDidDisappear: only gets called once. So, whatever bug is causing the double call (when the view controller is inside a UINavigationController in the SplitView) doesn't seem to happen on the viewDidDisappear.
It's a stupid kludge, but the bug is stupid too. Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With