2
votes

When my view (view A) loads, a UITextField becomes the first responder. I can then push a new view controller (view B), but when I pop that view controller back to view A, the UITextfield doesn't become the first responder anymore. I have to touch the textfield so that the keyboard will pop up. I'm using XIB's if that helps.

I tried setting the first responder in the viewDidLayoutSubviews method, or the viewWillLayoutSubviews but still nothing. I even used an NSNotification to detect if view B has been dismissed and then pop up the keyboard but nothing. I have no idea what else to do. It's like view A is completely dead.

Any suggestions?

1
Try to put it in viewWillAppear. Also for sanity check, is the textfield nil?Enrico Susatyo
Tried already. All the methods. And no, it's not nilGeorge Ciobanu

1 Answers

3
votes

-(void)viewDidAppear:(BOOL)animated was the solution