I’m having trouble to create a web view screen on a Kotlin moe project.
I followed the outdated tutorial: https://software.intel.com/en-us/node/633259
but without success.
Could you please tell how to create a Webview using storyboard (with proper outlet settings) then how to set an url from android studio.
Ok, I found how to do it without the need of using the story board.
If you want to use the WKWebView in fullscreen, just use this very simple method into your viewDidLoad:
private fun openWkWebView() {
val webView = WKWebView.alloc()
webView.init()
webView.setUIDelegate(object : WKUIDelegate {})// if you want more control over the UIDelegate, just override methods
webView.setNavigationDelegate(object : WKNavigationDelegate {})// if you want more control over the NavigationDelegate, just override methods
setView(webView)
val urlString = "https://threejs.org/examples/#webgl_loader_mmd"
// val urlString = "https://threejs.org/examples/#webgl_buffergeometry_instancing_billboards"
// val urlString = "https://threejs.org/examples/#webgl_lines_fat_wireframe"
val url = NSURL.URLWithString(urlString)
val nsurlRequest = NSURLRequest.requestWithURL(url)
webView.loadRequest(nsurlRequest)
webView.setAllowsBackForwardNavigationGestures(true)
webView.scrollView().setBounces(false)
webView.scrollView().setContentInsetAdjustmentBehavior(UIScrollViewContentInsetAdjustmentBehavior.Never) //remove safearea !!!
}
I am quite impressed with the performance of webGL examples (https://threejs.org/) on physical devices. I am sure anyone can create great apps & games quickly out these technologies
Here are some screenshots taken from an iPhone 6S+ (60fps)