0

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

  • the Master view, where one can choose the Feed
  • The Detail View where all the posts of a given Feed appear

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.

mirx
  • 148
  • 11
  • Using the `replace` segue. It was designed for that specific purpose. – CaptJak Aug 26 '13 at 18:09
  • 1
    Have you tried using the replace segue? Which segue are you currently using? How are you performing your segue? How is your segue created? – CaptJak Aug 26 '13 at 18:59
  • Hello, **Thanks** for your answer. My segue was defined as push, I replaced with popover but now I cannot get back if I click the WebView. Also, selecting another feed doesn't replace the WebView with another Feed list... – mirx Aug 27 '13 at 17:09
  • 1
    Don't use the popover segue. Use the `replace` segue. I don't mean "replace the segue" I mean use the `replace` segue. The name of the segue that you want to use is called `replace`. – CaptJak Aug 27 '13 at 17:34
  • You mean that one, don't you? http://i.imgur.com/ZVa2AEv.jpg Well it's the one I'm using but it does not work for me. Also, I'm missing the top navigation bar in the detail View. – mirx Aug 28 '13 at 04:37

1 Answers1

0

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

        [self.detailViewController.navigationController popToRootViewControllerAnimated:YES];

And it works expectedly with a push segue.

mirx
  • 148
  • 11