I am trying to show a WKWebView
over another view using the presentViewController
method but only shows a white screen.
I have implemented the WKWebView in my ViewController.m
as follows:
- (void)viewDidLoad {
[super viewDidLoad];
WKWebViewConfiguration *configuration = [[WKWebViewConfiguration alloc] init];
_webView = [[WKWebView alloc] initWithFrame:self.view.frame
configuration:configuration];
_webView.navigationDelegate = self;
[_webView loadRequest:[NSURLRequest requestWithURL:url]];
[self.view addSubview:_webView];
}
then in another class I have a method with the following code:
AppDelegate *delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
ViewController *webView1 =[[ViewController alloc] init];
[delegate.window.rootViewController presentViewController: webView1
animated:YES completion:nil];
This last code "presents" a white screen on top of my rootViewController
. I have no clue of why my webView is a white screen.