UIPopoverController and Keyboard on iOS 7 results on strange animation

493 Views Asked by At

On iOS 7, when you present a UIPopoverController, the system adds a UIView with some alpha effect to focus the user on the UIPopoverController. So far, so good.

The problem is that if you have a UIPopoverController that's being displayed from the bottom of your screen, and that UIPopoverController content has a UITextField (or anything else that brings the keyboard), the dimmed UIView animation doesn't follow the keyboard very well.

I've created a sample project to isolate the problem. Download Project

And a video of the same issue running on the simulator: Watch Movie

One solution could be to just disable the dimmed UIView as mentioned here, but I would like to keep it if possible.

Is there a workaround or maybe I'm doing something wrong? I'm starting to consider to fill a bug for this.

Thanks.

1

There are 1 best solutions below

1
On

Have you tried wrapping your code in a block to disable CoreAnimations implicit animation blocks? Something like this

[CATransaction begin];
[CATransaction setDisableActions: YES];
// Show your popover:
// [myPopover presentPopover:...]
[CATransaction commit];