简体   繁体   中英

iOS UIWebView does not show the websites correct

I am creating a simple UIWebView like shown. 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?

#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. Thanks for givin me ideas how to solve. Cheers

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