views:

519

answers:

4

I am having a problem that just started happening in OS 3.1.

I have a UITextField in a custom UITableViewCell. In didRotateFromInterfaceOrientation, I call reloadData to reload the tableview to resize the cells. The problem that is happening is: If you are editing text in that UITextField and have the keyboard up, then rotate the phone, the keyboard rotates but becomes non-functional. And then, if you rotate back, you get two keyboards one above the other. I've identified that it is the combination of rotating the phone and the call to 'reloadData' that causes the keyboard to stop functioning.

This happens in the simulator as well as on the phone. And it only happens in OS3.1. I tried compiling in OS3.0 and the problem doesn't happen.

Any ideas? Thanks.

-(void) didRotateFromInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation{
    [self.tableView reloadData]; 
}
A: 

I agree to Gordon to file a bugreport just in case.

Until then, you're probably better off resigning all first responders (thus getting rid of the keyboard) before a call to reloadData takes place.

Hauke
A: 

any response about this problem?

Alger
A: 

No resolution. So, my workaround is I resign the keyboard before reloading the table view.

Harris
A: 

Hello. To avoid this, implement layoutSubviews: in custom cell and relayout in it, not use reloadData:. (OS 3.1.2)

Hirobe