Fixes ITMS-90809 about UIWebView deprecation (#390)
This commit is contained in:
parent
2ec7cb5ce0
commit
5a175f44a0
2 changed files with 3 additions and 2 deletions
|
@ -45,7 +45,7 @@ def open_url_wbv(url, width, height):
|
|||
`width`: int
|
||||
Width of the window
|
||||
|
||||
Example for opening up a web page in UIWebview::
|
||||
Example for opening up a web page in WKWebview::
|
||||
|
||||
import ios
|
||||
url = "http://www.google.com"
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
#include <WebKit/WebKit.h>
|
||||
#include "ios_wrapper.h"
|
||||
|
||||
void ios_open_url(char *url)
|
||||
|
@ -18,7 +19,7 @@ void ios_open_url(char *url)
|
|||
void load_url_webview(char *url, int width, int height)
|
||||
{
|
||||
NSString *nsurl = [NSString stringWithCString:(char *)url encoding:NSUTF8StringEncoding];
|
||||
UIWebView *webView = [[UIWebView alloc] initWithFrame: CGRectMake(0, 0, width, height)];
|
||||
WKWebView *webView = [[WKWebView alloc] initWithFrame: CGRectMake(0, 0, width, height)];
|
||||
UIWindow *window = [[UIApplication sharedApplication] keyWindow];
|
||||
UIView *view = [window.rootViewController view];
|
||||
[view addSubview:webView];
|
||||
|
|
Loading…
Reference in a new issue