UIWebView and define dictionary
cocoa-touch, ios, iphone, objective-c, uiwebview
Solution
At the moment there are 52 other questions on stackoverflow mentioning this error..
From reading a few i think the code apple is using is calling `presentModalViewController:` before the actual dictionary view is fully loaded.
I think this is just a bug which apple has to solve, Rudolf Adamkovic's sample made it clear:
- Create "Single View Application"
- Add UITextView
- Run it
- Select a word in the text view
Choose Define
Debug console tell's you something like this:
Unbalanced calls to begin/end appearance transitions for
<_UIFallbackPresentationViewController: 0x74c1660>
I filed the bug at: https://bugreport.apple.com
Sample code: https://github.com/tiemevanveen/DefineBugDemoProject
Problem
I had the copy and define option built in with the UIWebView. It worked just fine on the iPad but on the iPhone, it only works once when I highlight the text and use the dictionary and the second time I tried it, it doesn't show up the popover. Any idea? UPDATE: I am getting the following error as well when dismissing the dictionary on the iPhone: Unbalanced calls to begin/end appearance transitions for UIFallbackPresentationViewController UPDATE: When I present a UIAlertView and cancel's it the dictionary works again. Wonder why?