views:

286

answers:

4

Hi,

I have a popover that contains a UITableView. This UITableView has a cell with a text field in it:

alt text

When the popover opens near the bottom of the screen, and I tap the text field to edit it, the keyboard comes up, and the popover moves up to avoid being covered by the keyboard. But as it moves up, the table view in the popover scrolls up out of bounds:

alt text

I can scroll it back down, but how do I prevent this from happening.

A: 

Try disabling scrolling on the table view.

[self.tableView scrollingEnabled:NO];
Jasarien
Tried this, didn't work.
macatomy
A: 

How are you setting the content view of your pop over controller. Please try editing the auto-resizing mask of the content view and set it from top-left.

Hope this helps.

Thanks,

Madhup

Madhup
Also tried this, and it didn't work
macatomy
A: 

Perhaps you can set the UITableView's contentSize manually? So that there is no excess for it to scroll up.

v01d
I did this as well, and then I NSLogged the content size after the scroll view went out of bounds, and there is no change in the content size but the problem is still there.
macatomy
I'd probably start to look at a bug report. I don't see how you have done anything wrong or could do anything more right, and the UIPopoverController has been pretty buggy during my experience with it.
v01d
Will do, thanks.
macatomy
+1  A: 

I've come to the conclusion that this is a bug. I have filed a bug report with Apple (rdar://8156616) as well as a report on OpenRadar.

For anyone interested, here is a sample project that demonstrates the issue.

macatomy