简体   繁体   English

uiwebview 加载页面问题

[英]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我的网页不会加载它什么都没有显示我在 firstviewcontroller 中有 3 个视图控制器您单击加载下一页的按钮 thirdviewcontroller 到目前为止一切都很好,但网页没有加载

code from firstviewcontroller来自 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. 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];移动[super viewDidLoad]; to the top of viewDidLoad method.到 viewDidLoad 方法的顶部。 You should invoke the super class implementation of it first.您应该首先调用它的超级 class 实现。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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