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, 2022 in Others by Soham
• 9,710 points
3,885 views

1 answer to this question.

0 votes

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

NSURL *url = [NSURL URLWithString:@"https://edureka.co/"];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[self.webView loadRequest:request];
answered Sep 20, 2022 by Aditya
• 7,680 points

Related Questions In Others

0 votes
1 answer

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

Assuming you have your iPad Pro connected ...READ MORE

answered Nov 4, 2022 in Others by gaurav
• 23,260 points
1,448 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, 2022 in Others by rajatha
• 7,680 points
10,598 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, 2022 in Others by gaurav
• 23,260 points
571 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
1,803 views
0 votes
1 answer

Getting country calling prefix

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

answered Sep 20, 2022 in Others by Aditya
• 7,680 points
832 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, 2022 in IOS by Rahul
• 9,680 points
654 views
0 votes
1 answer

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

Apple's CallKit is a framework introduced with iOS ...READ MORE

answered Nov 4, 2022 in Others by gaurav
• 23,260 points
1,375 views
0 votes
0 answers

How to create Multiple Themes/Skins for iphone apps?

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

Sep 28, 2022 in IOS by Soham
• 9,710 points
620 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, 2022 in Others by Aditya
• 7,680 points
1,681 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