5 ms·
Just wanted to chime in and say that's actually really bad code. Accessing a views subviews like that and looking for a specific instance of a class is just beg
by afoxtron 11y ago
Just wanted to chime in and say that's actually really bad code. Accessing a views subviews like that and looking for a specific instance of a class is just begging for a crash.
- EugeneOZ 11y agoAfter reading lines 5 and 6 it does not surprising me.
- kennywinker 11y agoCounterpoint: they have all the nil checks needed for this to fail silently if no UIWebBrowserView is found. It's a fragile implementation in that it might stop working if Apple changes the internal implementation of UIWebView, but it doesn't look like it'll crash because of it. That said, clearly it's not good for Apple to have large numbers of apps relying on private implementation details. It hamstrings them when it comes time to improve the OS. That translates to a harm for users. I'm not advocating for this hack. I wonder if this could be avoided by switching to WKWebView?
- masklinn 11y ago> I wonder if this could be avoided by switching to WKWebView? Nope, the keyboard UI is pretty much the same and the API does not provide any more support for disabling the accessory bar.