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?
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:
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
Without seeing your code it is going to be really hard to give an answer to this question. It would be much easier if you would show your logic.
That being said, here are a couple of tips that might help:
viewDidAppear:animated
or viewDidLoad
, make sure you call the super methods.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With