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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T09:45:15+00:00 2026-05-31T09:45:15+00:00

I am attempting to follow this example: http://howtomakeiphoneapps.com/uiwebview-tutorial/239/ I have added a UIWebView into

  • 0

I am attempting to follow this example: http://howtomakeiphoneapps.com/uiwebview-tutorial/239/

I have added a UIWebView into my view (using Storyboard)… I added the IBOutlet to my .h controller file. (see image at: http://imgur.com/GfUmC). I added a delegate to the view controller like this:

#import <UIKit/UIKit.h>

@interface slWebViewController : UIViewController <UIWebViewDelegate> {
    IBOutlet UIWebView *slWebView;    
}

@end

Since I’m using XCode 4, I don’t know how to set the UIWebView’s delegate to the File Owner, which is why I think this is what I’m getting a black screen. I’m missing something, but I don’t know what. At this point, I would really, really appreciate any help I can get solving this…

  • 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-31T09:45:17+00:00Added an answer on May 31, 2026 at 9:45 am

    In your Storyboard, right click (or ctrl-click) and drag from your UIWebView to the File’s Owner on the left side, and choose “delegate”.

    Alternatively, select the webView (as in your image). Note the top outlet, “delegate”. Drag from there to the File’s Owner.

    Or you can code it. In viewDidLoad, type “self.sIWebView.delegate = self;”

    All of this is assuming that you have your URL request right. In case you don’t, here’s an example:

    NSURL * url = [NSURL URLWithString:@"http://google.com"];
        NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL: url  
                                                               cachePolicy: NSURLRequestReloadIgnoringCacheData    
                                                           timeoutInterval: 10];
        [sIWebView loadRequest:request];
    

    EDIT: If you are presenting the webView modally, add this code to the view controller that segues to your webview: -(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{ if ([segue.identifier isEqualToString:@"SegueIdentifier"]) { WebViewController *webView = segue.destinationViewController; webView.delegate = self; } } You’ll need to add an identifier to your segue. Just click on the segue itself, go to the third tab from the right, and type in an identifier.

    UPDATE: I’ve isolated the problem to the webViewConroller.m file. Everything is connected properly. If I place the loadRequest code in the viewController at viewDidLoad, I see Google. If I place the loadRequest code in the “webViewController”, and mark the ViewContoller as a custom class of webViewController, I get the black screen. I’m wondering if there isn’t a better way to get the UIWebView to display content? I really don’t need a controller for the webView, just when the segue for that cell is tapped, display the contents of the UIWebView… not sure I can do it with XCode…

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

Sidebar

Related Questions

I'm attempting to follow this tutorial for creating lists of content: http://docs.orchardproject.net/Documentation/Creating-lists I've successfully
I have created a custom title bar as shown in this example http://staticallytyped.wordpress.com/2011/03/18/android-dynamic-and-custom-title-bars/ A
This is my first experience using the Zend Framework. I am attempting to follow
I am attempting to follow along to this tut: HERE but using a sprite
Attempting to use the data series from this example no longer passes the JSONLint
Code snippet to follow. I have a struct (example code has class, tried both,
I am currently attempting to follow along with section 10.38 from RoR Tutorial. All
I am new to OOP and I have been working on this example but
I think my example will make this easier to follow: class x(): def a(self):
I am new to Zend and have been attempting to follow the Zend Quick

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.