Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ios - how can i insert a native view behind the webview in a phonegap/cordova plugin?

Tags:

ios

cordova

I'm writing a Phonegap/Cordova plugin that needs to insert a native UIView behind the webView that Cordova provides. I've tried doing the following:

[self.webView.superview insertSubview:myView belowSubview:self.webView];

and

[self.webView.superview addSubview:myView];

Both of these added myView on top of the webView.

Is there any way to do this?

like image 690
user3622230 Avatar asked Nov 02 '22 00:11

user3622230


1 Answers

You could try:

[self.webView.superview addSubview:myView];
[self.webView.superview bringSubviewToFront:self.webView];
like image 53
Calvedos Avatar answered Nov 11 '22 03:11

Calvedos