Have my UIPickerView having the same behavior than the keyboard.

Posted by camilo on Stack Overflow See other posts from Stack Overflow or by camilo
Published on 2010-05-27T16:14:50Z Indexed on 2010/05/27 23:01 UTC
Read the original article Hit count: 128

Filed under:
|
|

Hi.

So I have a UITableView where one of its rows is a UITextView.

When the user is writing something to UITextView (using the keyboard) the user can scroll the tableview and select another cell. Everything works.

When the user selects another cell, a datePicker appears, and the user can select a given date. I want the user to be able to scroll the tableView the same way like when the keyboard is on the screen.

The problem here is that when I scroll with the picker, the table bounces back to the previous position (with some cells hidden by the picker).

I assume that this happens because I add the picker to the main window, as a subview... but I'm honestly not sure...

Where (and how) should I add my picker so that it "appears" where the keyboard appears?

Not sure I was clear...

Thanks a lot.

© Stack Overflow or respective owner

Related posts about iphone

Related posts about uitableview