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

  • Home
  • SEARCH
  • 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 4056694
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T14:51:34+00:00 2026-05-20T14:51:34+00:00

Good morning everyone, I have an RSS reader tha opens a Detail view controller

  • 0

Good morning everyone,

I have an RSS reader tha opens a Detail view controller when a feed in tableView is clicked. The HTML of the feed is loaded from a items array like this in DetailController’s custom setFeed() method:

[self.itemContent loadHTMLString:[NSString stringWithFormat:@"%@"[item objectForKey:@"content"]] baseURL:nil];

HTML gets loaded without any problems. If any link within is clicked the new request is loaded in the same UIWebView. The problem is that I want to show the web page in another UIWebView when a link inside itemContent is clicked.

So, what I did is I declared

itemContent.delegate = self 

and in the delegate class (self) defined following method:

 -(BOOL)webView:(UIWebView*)webView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType {if (navigationType == UIWebViewNavigationTypeLinkClicked) {

    NSLog(@"Opening Outside link!!!\n");

    BrowserViewController *browserViewController = [[[BrowserViewController alloc] init] autorelease];

    //following line doesn't change anything in the result
    //browserViewController.webView.delegate = self;

    [browserViewController.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.google.com"]]];

    [self.navigationController pushViewController:browserViewController animated:YES]; 

    return NO;

    }

return YES;

}

This method definitely recognizes between loading the HTML for the first time in itemContent from clicks performed on the links in itemContent webView.
NavigationController pushes to the next View but nothing s loaded in it. I mean I’ve put one label next to UIWebView in the NIB file of BrowserViewController just to be sure that the NIB is loaded by seeing the label; and its showing. Also, I defined an Outlet webView connected with the UIWebView in NIB file, so this shouldn’t be the problem.

If its not clear what seems to be the problem is: when the link is clicked, browserViewController is presented with the label but webView doesn’t load the request.

Please, if someone could check the code provided that would be great.

I wish you a very nice day,
L

  • 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-20T14:51:35+00:00Added an answer on May 20, 2026 at 2:51 pm

    When you put a NSLog(@"WebView: %@", browserViewController.webView); in front of your loadRequest call you will see that the webView is nil.

    The webView is not available at this time. It wasn’t created in the init method.

    I would suggest to add a NSURL *url; property to your BrowserViewController. And then instead of [browserViewController.webView loadRequest:... you could use browserViewCOntroller.url = request.URL;. Or you could save the NSURLRequest directly.

    And in the viewDidLoad method of the BrowserViewController you can tell the webview to load the URL, or the URLRequest.


    But I’m just guessing.

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

Sidebar

Related Questions

No related questions found

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.