简体   繁体   English

UIWebView不能loadRequest

[英]UIWebView not loadRequest

I have this code and not loading this page i do not know what happen 我有此代码,但未加载此页面,我不知道会发生什么

in iPad dont work and only show a empty screen when webViewDidFinishLoad finish. 在iPad中无法正常工作,仅在webViewDidFinishLoad完成时显示空白屏幕。

And the iPhone works fine whats wrong? iPhone运行正常怎么办?

Because only this link dont works https://www.facebook.com/peopemexico 因为仅此链接不起作用https://www.facebook.com/peopemexico

this is my code: 这是我的代码:

.h

@interface WebRedesIpad : UIViewController <UIWebViewDelegate>


@property (strong, nonatomic) IBOutlet UIWebView *propNavegador;



.m

    - (void)viewDidLoad
    {
    _propNavegador.delegate=self;

    [_propNavegador loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"https://www.facebook.com/peopemexico"]]];

    }


    - (void)webViewDidFinishLoad:(UIWebView *)webView
    {
        [activityIndicator stopAnimating];

    }

您是否已在同一类的.h文件中编写了UIWebViewDelagte?

If it's working in iPhone and not in iPad then you must have not linked variable propNavegador to iPad storyboard/ NIB files. 如果它在iPhone而不是iPad上运行,则您必须未将变量propNavegador链接到iPad故事板/ NIB文件。

You must have attached to only iPhone storyboard/ NIB files. 您必须仅附加到iPhone故事板/ NIB文件。

Please check and let me know. 请检查并让我知道。

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

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