tags:

views:

57

answers:

2
  1. I have code that dynamically load 10 different textfields in viewdidload method
  2. now if i click on any UITextfield and then autorotate device then my cursor should directly come to that UITextfield when device rotates from portrait to landscape mode
  3. second case is that if i click on any UITextfield and then i click on return and then if i rotate my device from portrait to landscape mode then also it works as 1 st case

How to do this thing by code
any guidance helps me a lot
I'm stuck here

+2  A: 
UITextField *filed;

. . .

[filed becomeFirstResponder];

[filed becomeFirstResponder]; will set ur text field as a first responder. set your textfield as a first responder where your handling the autrotate.

Manjunath
IS it worked for u?
Manjunath
A: 

No bcoz my structure is like that

I have 2 UITextfield below that 1 UIButon below that 2 UIButton below that 5 UITextfield below that 1 UIButton below that 1 UITextfield