views:

579

answers:

3

I present a modal view controller on my on my iPad with UIModalPresentationFormSheet presentation style and UIModalTransitionStyleCoverVertical transition style. The Modal View Controller contains a UIWebView with some TextFields on it. When the user taps one of the text fields the keyboard comes up.

I have noticed that in landscape mode after the keyboard is shown, if I try to dismiss the modal view controller with animation the view changes its position from the center of the screen to the left side just before the animation starts..

This happens only if the keyboard is up and only in landscape mode on the iPad. If the user closes the modal view without pressing on any text field this doesn't happen.

Anyone familiar with this strange behavior?

A: 

Yes! I'm thinking this is a bug, the Wordpress app exhibits this problem too, though strangely, Mail.app doesn't?

Jonesy
By the way, a simple workaround is to move to UIModalTransitionStyleCrossDissolve
Jonesy
I take that back, still jumps to the left with UIModalTransitionStyleCrossDissolve :-(
Jonesy
+2  A: 

I just found a solution to this. Call resignFirstResponder on the current responder and then call dismissModalViewControllerAnimated".

Definitely a bug with iOS but this works for me.

pryomoax
Definitely a bug. I had this problem, and calling resignFirstResponder worked. Thanks.
dbachrach
This solution works for me as well. Have you filed a Radar bug?
David M.
A: 

Me have same problem .

But where I have to call resignFirstResponder in the code.

Plz help me.

Thanks in advance.

Umar