Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 383331
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T15:16:21+00:00 2026-05-12T15:16:21+00:00

I have a didSelectRowAtIndexPath action that adds a navigation bar and displays a new

  • 0

I have a “didSelectRowAtIndexPath” action that adds a navigation bar and displays a new view. There’s an action in the new view that pushes another view onto the navigation stack, and it works, but clicking “back” doesn’t restore the previous view.

The sequence is basically:

  • user clicks table cell
  • Navigation bar appears, with new view below it, showing some html with links
  • user clicks a link and new view is added to nav, along with a back button
  • user clicks back button, nav rolls back properly, but view doesn’t change

The new view is added by capturing a click on a link like so:

- (BOOL)webView:(UIWebView*)webView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType {
if(navigationType == UIWebViewNavigationTypeLinkClicked) {
    UINavigationItem *navigationItem = [[UINavigationItem alloc] initWithTitle:@"webpage"];
    [flipsideNavigationBar pushNavigationItem:navigationItem animated:YES];
    [navigationItem release];

    WebViewController *viewController = [[WebViewController alloc] initWithNibName:@"webView" bundle:nil];
    UIView *webPageView = self.webViewController.view;
    [webPageView addSubview:viewController.view];
    [webPageView insertSubview:flipsideNavigationBar aboveSubview:viewController.view];
    [[viewController.view.subviews objectAtIndex:1] loadRequest:request];
    [webView stopLoading];
    return YES;
}
return YES;
}

I’m not sure what I’m doing wrong; what should happen is the “back” button should dismiss the current view and return to the previous. Can anyone suggest anything to try?

Thanks!

John

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T15:16:21+00:00Added an answer on May 12, 2026 at 3:16 pm

    The recommended way to do this is to just use a UINavigationController and push UIViewControllers onto the stack, either modal or non-modal.

    If you wish to stick with your custom solution, you should set a delegate for your UINavigationBar and implement its shouldPopItem: or didPopItem: methods. Documentation link

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a UITableViewController that uses didSelectRowAtIndexPath: to init a view controller with initWithNibName:
I have two views with navigation controller: first view, there are empty text fields
I have a Tableview on AppDelegate That calls a SecondView (dvController) when DidSelectRowAtIndexPath using:
I have put a web view inside a uitableviewcell Problem : didSelectRowAtIndexPath is not
CODE I have some code that adds a UILongPressGestureRecognizer gesture recognizer called _recognizer to
I'm writing an iPhone app. Starting from a view controller in a navigation stack
I have a UITableViewController which in it's tableView:didSelectRowAtIndexPath method, sets up a view controller,
I have a table view with custom cells and I recognize swipes in that
Suppose I have a navigation controller where the next action is to take a
I have the following code in a view controller that (in all other respects)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.