WebViews and Overlays

I have an App that shows an html by a webview, then I have a button that shows me an overlay but the Webview appears over the overlay, what can I do to solve this? I don’t want the webview to “disappear” , I want the overlay to be over the webview.

I tried doingc “object:toFront()” and “object:toBack()” but it doesn’t work.

You can’t control the layer of webView object since it’s part of the native API and not a part of the OpenGL canvas.

You can find more information here:

https://docs.coronalabs.com/api/library/native/newWebView.html#gotchas

It’s the same problem I have with native text fields. I really don’t know if you could make the webview visible or not when the overlay is on screen.

webView.isVisible = false

Do your overlay in html?

At the end I changed Webview.isVisible to false, is not what I wanted to do, but maybe the best and the easiest solution in this case.

Thanks everybody for answering.

You can’t control the layer of webView object since it’s part of the native API and not a part of the OpenGL canvas.

You can find more information here:

https://docs.coronalabs.com/api/library/native/newWebView.html#gotchas

It’s the same problem I have with native text fields. I really don’t know if you could make the webview visible or not when the overlay is on screen.

webView.isVisible = false

Do your overlay in html?

At the end I changed Webview.isVisible to false, is not what I wanted to do, but maybe the best and the easiest solution in this case.

Thanks everybody for answering.