[英]iOS UIWebView does not show the websites correct
我正在創建一個如圖所示的簡單UIWebView。 一切正常,但網站已損壞。 看起來好像沒有加載圖像。
奇怪的是,在瀏覽器中,同一頁面加載的很好O_o有什么想法嗎?
#import "WebViewController.h"
@interface WebViewController ()
@property NSURL *adUrl;
@property (weak, nonatomic) IBOutlet UIWebView *webView;
@end
@implementation WebViewController
-(id) initWithUrl:(NSURL *)url
{
self = [super init];
if (self)
{
self.adUrl = [NSURL new];
self.adUrl = url;
}
return self;
}
- (void)viewDidLoad
{
[super viewDidLoad];
[self.webView loadRequest:[NSURLRequest requestWithURL:self.adUrl]];
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end
任務解決了。 問題是,負責WebCaching的舊類干擾了重定向,並因此抑制了BaseURL對象的負載。 感謝您給我一些解決方法的想法。 干杯
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.