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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:35:34+00:00 2026-05-26T18:35:34+00:00

I have a ViewController embedded in a NavigationController. The ViewController has a UIWebView that

  • 0

I have a ViewController embedded in a NavigationController. The ViewController has a UIWebView that I’m trying to capture links from. I’m able to intercept the links, but when I try to push the link content to a detail page, it seems to be firing a new Controller but it’s invisible. If I click a link for a second time (or if I just click a second link) I see a back button pop up, but again the actual content of the new ViewController is not visible.

Here is the log output for the first link click:

2011-11-07 10:38:27.526 WGGB[43875:f803] *** WebKit discarded an uncaught exception in the webView:decidePolicyForNavigationAction:request:frame:decisionListener: delegate:   <NSInternalInconsistencyException> Could not load NIB in bundle: 'NSBundle  </Users/sonnyjitsu/Library/Application Support/iPhone Simulator/5.0/Applications/4B3D5152-4EA5-4C84-BB22-A774FCB8B6A7/WGGB.app> (loaded)' with name 'Detail View'

As you can see, it’s “loading” the new view, but I see nothing in the simulator. Then the second time I click the same link (or click a new link) I see this in the log:

2011-11-07 10:38:30.605 WGGB[43875:f803] url is http://www.blahblahblah.com/mobile

The method in question is this:

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

    NSURL *url = request.URL;
    NSString *urlString = url.absoluteString;
    NSRange page = [ urlString rangeOfString: @"/mobile" ];
    if (page.location == NSNotFound) {

        SingleStoryViewController *detailViewController = [[SingleStoryViewController alloc] initWithNibName:@"Detail View" bundle:nil];
        NSString *requestURL = 
            [NSString stringWithContentsOfURL:url encoding:NSUTF8StringEncoding error:nil];
        [detailViewController.webView loadRequest:
            [NSURLRequest requestWithURL:[NSURL URLWithString:requestURL]]];
        [self.navigationController pushViewController:detailViewController animated:YES];

        NSLog(@"url is %@", url);
        return NO;
    } else {
        return YES;
    }
}

Top of my SingleStoryViewController.m

#import "SingleStoryViewController.h"

@implementation SingleStoryViewController

@synthesize webView;

Entire SingleStoryViewController.h
#import

@interface SingleStoryViewController : UIViewController

@property (weak, nonatomic) IBOutlet UIWebView *webView;

@end

Here is a link to an image of my Xcode storyboard, for what it’s worth: https://i.stack.imgur.com/Y7A6j.png

I’ve been working on this for a good 14 to 16 hours now and I’m finally saying ‘uncle’ and asking for help. Any help would be appreciated, I’m very new to iOS programming so I apologize if there is something really stupid I’m missing.

  • 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-26T18:35:35+00:00Added an answer on May 26, 2026 at 6:35 pm

    As you can see, it’s “loading” the new view…

    That’s not what the error says. The error says this:

    Could not load NIB in bundle: [...] with name 'Detail View'
    

    I’d start by checking the name of the .xib file in your app — it sounds like it may not match the name you’re using in the code.

    Update: Per comments below, it turns out that this is app uses storyboards and doesn’t contain any .xib files, so it’s no surprise that attempting to load a view controller from a .xib produces an error. The correct way to load a view controller from a storyboard, when necessary, is to use UIStoryboard’s -instantiateViewControllerWithIdentifier: method instead of UIViewController’s -initWithNibName:bundle:.

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

Sidebar

Related Questions

I have a ViewController in Interface Builder that has a TableViewController embedded in it
I have a ViewController that has its own NIB. I would like to embed
I have a UITabBarController that adds a viewController, but the positioning is off. There
I have a viewController that pops a modal view with a UIWebView. If I
I have a viewController that has a tableView and a custom loading UIView that
I have a viewController (Planner) that loads two view controllers (InfoEditor and MonthlyPlan) when
I have a viewcontroller like the following. But the touchsBegan doestnt get detected. Can
I have a viewController that autorotates just fine, The problem is that is I
I have just noticed that my ViewController does not call init (See below) when
I have a viewController that presents a modalViewController when a UINavigationBarItem is touched. After

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.