Closed DarkSatyr closed 3 years ago
Found a solution:
Since captcha has fixed size...
let width = min(302, viewController.view.bounds.width)
let height = min(516, viewController.view.bounds.height)
webView.frame = CGRect(center: viewController.view.bounds.center, size: CGSize(width: width, height: height))
Inside configureWebView closure
Found a solution: Since captcha has fixed size...
let width = min(302, viewController.view.bounds.width)
let height = min(516, viewController.view.bounds.height)
webView.frame = CGRect(center: viewController.view.bounds.center, size: CGSize(width: width, height: height))
Inside configureWebView closure
But what if google choose to change size one day ? Is there a another way to performe the "center"
Webviews usually have a hard time figuring out the size of their contents. You can try and set the frame based on the contentSize
, but your best bet would be to use a fixed size
iOS 13.4 Device: iPhone X
Captcha widget appears on the upper-left side of screen