XCODE: Unbalanced calls to begin/end appearance tr

2019-09-18 18:24发布

问题:

I have in my app a UIWebView, and in that web view I navigate to my mobile site where there is a button input with type 'Choose File' for loading a new profile picture. Each time I try the 'Choose Existing' or 'Take Photo' options from the resulting pull-up iPhone menu, I receive the following error when my View Controller disappears to allow me to choose a photo:

"Unbalanced calls to begin/end appearance transitions for UIFileUploadFallbackRootViewController: 0x20d65940"

After an image is chosen, the app just returns a black screen...

When I perform the same operation in Safari, the 'Choose File' function works perfectly fine.

Notes:

1.) I am using a UINavigationController within my app (i.e. popping and pushing views).

2.) HTML Code on mobile website for loading photos:

<form class="appnitro" enctype="multipart/form-data" method="post" action="mysite.php">
<input id="file1" name="file1" class="button_text" type="file" size="50px"/> <br />
<input id="submitpic" class="button_text" type="submit" name="submit" value="Save Picture"     />

Using jquery mobile.

Thanks in advance for any help you can offer!

回答1:

Your window's rootViewController is not set.

See this answer: https://stackoverflow.com/a/16548036/199516



回答2:

This problem generally occurs when i push two view controllers simultaneously with animation.