4 ms·
Could you do something like this? 1. Add a text input as another view outside the UIWebView 2. Translate the frame of the input off screen so it's not visible
by Benjammer 11y ago
Could you do something like this?
1. Add a text input as another view outside the UIWebView
2. Translate the frame of the input off screen so it's not visible
3. Wire up the input with the webview to mirror focus with the webview text input (maybe a combination of UIWebView executing JS, and the web content passing redirects back to the webview delegate that get interrupted by webView:shouldStartLoadWithRequest:navigationType:)
4. Pass the text input back into the webview from the text view delegate method textView:shouldChangeTextInRange:replacementText:
- dopernicus 11y agoThis is something we haven't explored enough yet, but would be awesome to get working since it would allow us to support all UITextInputTraits and get rid of the accessory bar. We had a simple PoC, but I seem to recall there being some weird edge cases. Definitely worth looking into more though!