iosmaster-detailuisplitview

iOS / Master Detail : how to pop the subdetail view when switching detail from the master controller?


I am still working on my iPad RSS Reader. It consists of 2 Views:

Whenever touching a Post Cell, I follow a segue which pushes a WebView on top of my Detail controller.

If I select another Feed in the Master View when I have such a Webview over my Detail View, it will load it, but below the displayed WebView.

How may I "empty" the Detail View (=pop its eventually pushed Web View) whenever switching Feeds?

Thanks for your help.


Solution

  • OK, I added the following in the Master Controller didSelectRowAtIndexPath:

            [self.detailViewController.navigationController popToRootViewControllerAnimated:YES];
    

    And it works expectedly with a push segue.