white screen on simulator iphone Xcode

0 votes

I viewed the Xcode video on YouTube. How to Make an iOS Application Webview

I watched the tutorial, but when I launch my software on the simulator, all I see is a blank screen.

enter image description here

This ViewController.h

//
//  ViewController.h
//

#import <UIKit/UIKit.h>

@interface ViewController : UIViewController

{
    IBOutlet UIWebView *myWebView;

}


@end


//

// ViewController.m //

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];


    NSURL *myURL = [NSURL URLWithString:@"http://website.com"]; NSURLRequest *myRequest = [NSURLRequest requestWithURL:myURL]; myWebView.scalesPageToFit = YES; [myWebView loadRequest:myRequest];

}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
Sep 19 in Others by Soham
• 9,330 points
24 views

1 answer to this question.

0 votes

After creating the request, you must actually load it:-

NSURL *url = [NSURL URLWithString:@"http://yoururl.com"];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[self.webView loadRequest:request];
answered Sep 20 by Aditya
• 7,660 points

Related Questions In Others

0 votes
0 answers

Xamarin iOS app displaying white blank screen on iPad after update to Xcode 11

I have a Xamarin.iOS app developed on Visual Studio 2019 and ...READ MORE

Sep 22 in Others by gaurav
• 18,960 points
22 views
0 votes
1 answer

App iOS stuck on blank white screen when build release React Native

I use many node version so the ...READ MORE

answered Sep 21 in Others by rajatha
• 7,440 points
60 views
0 votes
0 answers

what font face of clock on lock screen of iPhone (iOS 9)

What font face and font size of ...READ MORE

Sep 23 in Others by gaurav
• 18,960 points
17 views
0 votes
1 answer

swift for windows? xcode on windows? ?

Hi, @Aminegac, If you’re a little more technically ...READ MORE

answered Dec 4, 2020 in Others by Nikita
608 views
0 votes
1 answer

Getting country calling prefix

For a class that offers both this ...READ MORE

answered Sep 20 in Others by Aditya
• 7,660 points
21 views
0 votes
1 answer

Is there a way to to check if a picture was taken on that iPhone?

Actually, the model and manufacturer information is ...READ MORE

answered Sep 22 in IOS by Rahul
• 9,240 points
16 views
0 votes
0 answers

How to show caller image on iOS native ui call by using callkit framework?

In my iOS app, I am using ...READ MORE

Sep 22 in Others by gaurav
• 18,960 points
21 views
0 votes
0 answers

How to create Multiple Themes/Skins for iphone apps?

I already have an iPhone app that ...READ MORE

5 days ago in IOS by Soham
• 9,330 points
15 views
0 votes
1 answer

Getting "net::ERR_BLOCKED_BY_CLIENT" error on some AJAX calls

Matching the URLs against a type of ...READ MORE

answered Feb 22 in Others by Aditya
• 7,660 points
214 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP