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 8731567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:16:05+00:00 2026-06-13T09:16:05+00:00

I am having a strange problem that I don’t understand, and therefore don’t know

  • 0

I am having a strange problem that I don’t understand, and therefore don’t know where to start debugging.

FIRSTLY, THE REQUIREMENT

I have a UISplitView. The Master view contains a table which loads different views into the Detail view. For one table cell, I want a website loaded full screen. Therefore, rather than hiding the Master view and resizing the Detail view, I am presenting a view controller. It is with this that I have the problem.

THE CODE

Below is the code i currently have – greatly stripped down to avoid clutter

-- MASTER VIEW --

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    ProjectWebViewController *detailView=[[ProjectWebViewController alloc] init];
    UIViewController  *localdetailViewController = detailView;

    UINavigationController* navController = [[UINavigationController alloc] initWithRootViewController:localdetailViewController];
    [self presentViewController:navController animated:YES completion:nil];
}

I then have the following in the presented view controller

-- PRESENTED VIEW CONTROLLER --

- (void)viewDidLoad
{
    [super viewDidLoad];

    UIWebView * webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, 768, 1024)];

    NSURL *url = [NSURL URLWithString:@"http://www.google.com"];
    NSURLRequest *request = [NSURLRequest requestWithURL:url];
   [webView loadRequest:request];

    [[self view] addSubview:webView];

   UIBarButtonItem *backBtn = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAction target:nil action:@selector(closeSelf)];
    [[self navigationItem] setLeftBarButtonItem:backBtn];
}

-(void)closeSelf
{
    [[self navigationController] dismissViewControllerAnimated:YES completion:nil];
}

THE PROBLEM

The above works well with one exception. The back button i added to the navigation bar does nothing when clicked. However, if i click any white space on the web page that is loaded, the back button works. I have tested this many times. Even if I click some white space and then click a link on the web page, the back button stops working again until more white space is clicked on the current web page.

Can anyone point me in right direction?

Thanks

  • 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-06-13T09:16:07+00:00Added an answer on June 13, 2026 at 9:16 am
    UIBarButtonItem *backBtn = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAction target:nil action:@selector(closeSelf)];
    

    target should be set to self instead of nil

    UIBarButtonItem *backBtn = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAction target:self action:@selector(closeSelf)];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having a strange problem in that I have php inserting text into a
Im having a very strange problem, i have a complicated view that returns incorrect
I've been having a strange problem that I've never seen before. Now I have
I'm having a strange problem with Android 1.6 I have an application that has
I'm having a strange problem that is affecting at least some of my international
I'm having a strange problem. I have a HTML page with PHP code which
I'm having a strange problem, that I've been trying to solve for too long.
I am having a very strange problem in a simple program and have been
I'm having a strange problem that I can't figure out that popped up when
I don't know if it is a common problem, but this strange problem is

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.