简体   繁体   English

iOS UIWebView无法正确显示网站

[英]iOS UIWebView does not show the websites correct

I am creating a simple UIWebView like shown. 我正在创建一个如图所示的简单UIWebView。 All works fine but the websites are corrupted. 一切正常,但网站已损坏。 it looks like, the images arent loaded. 看起来好像没有加载图像。

Curious is, that in the Browser, the same page is loading fine O_o Any Ideas? 奇怪的是,在浏览器中,同一页面加载的很好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

Task solved. 任务解决了。 The Problem was, that an old Class which was responsible for WebCaching was disturbing the redirect and on that way it suppressed the load of baseURL objects. 问题是,负责WebCaching的旧类干扰了重定向,并因此抑制了BaseURL对象的负载。 Thanks for givin me ideas how to solve. 感谢您给我一些解决方法的想法。 Cheers 干杯

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

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