简体   繁体   中英

uiwebview problem loading page

My webpage will not load it shows nothing I have 3 viewcontrollers in firstviewcontroller you click the button which loads the next page thirdviewcontroller up to this point all is good but the webpage doesnt load

code from firstviewcontroller

-(IBAction)moveToViewSiteView:(id)sender{

    self.third = [[[SecondViewController alloc]initWithNibName:@"ThirdViewController" bundle:nil]autorelease];
    [self.navigationController pushViewController:self.third animated:YES];
}

code in thirdviewcontroller

- (void)viewDidLoad {

    NSString *urlAddress=@"http://www.apple.com/";
    NSURL *url=[NSURL URLWithString:urlAddress];
    NSURLRequest *requestObj= [NSURLRequest requestWithURL:url];
    [self.cscsPage loadRequest:requestObj];
    [super viewDidLoad];
}

the uiwebview i have called webview in the document window in ib if i drag from files owner to the webview then when i run it the app crashes.

hope all is clear

thanks

Move [super viewDidLoad]; to the top of viewDidLoad method. You should invoke the super class implementation of it first.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM