I have a view controller that is hosing a WKWebView. My view controller overrides buildMenu(with builder: UIMenuBuilder)
, and prior to the beta, this was called reliably. However under 18.2 beta 4, it is not called at all, despite no code changes on my part.
Things I've tried:
- Ensured that my responder chain is set up correctly.
- Walked through the debugger via a symbolic breakpoint on
[UIResponder buildMenuWithBuilder:]
to understand that the web view is the last object to get abuildMenuWithBuilder
message.
Any feedback or commiseration would be appreciated.
I can experience the same issue and this bug breaks some features of my App as well.
But I’ve found some kind of workaround: If you overide WKWebView you can override buildMenu(with builder: UIMenuBuilder) there. Within this method you first call super.buildMenu(with builder: UIMenuBuilder) to let the webview do its menu configuration and then you can do your own menu configuration (for example adding your own menu items).
This might not be the most elegant solution, but at least for my project it is an easy workaround and works well.