fjcaetano / ReCaptcha

[In]visible ReCaptcha v2 for iOS
http://blog.flaviocaetano.com/post/recaptcha-reaches-1-dot-0/
MIT License
267 stars 133 forks source link

Change Widget WebView Frame, is it Possible ? #121

Closed hinaHingrajia closed 1 year ago

hinaHingrajia commented 2 years ago

I'm using ReCaptcha v2 Invisible keys! In my application I'm adding webview inside my custom view and then after getting token just removing it from my custom view and hiding the custom view.

My question is I want to change frame of widget screen of ReCaptcha(challenge selection) which is being shown within webview, plus needed to be transparent webview so background base view controller can be visible.

is it possible ?

Thank you.

fjcaetano commented 2 years ago

You can resize the webview, but its contents are controlled by Google/ReCaptcha, which means there's no assurance the layout won't be broken. Increasing the size of the webview is usually not an issue, because you're providing more space than required to properly render the view. However, downsizing it is when you might start finding issues.

You can change the background color of a WKWebView, however I don't know if you can make it transparent. It sounds like you might be able to achieve what you need if you host the webview in an intermediate view with an overlay, instead of trying to manipulate the WKWebView directly