A question related to UITextfield
- I have code that dynamically load 10 different textfields in viewdidload method
- 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
- second cas开发者_运维问答e 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 hereUITextField *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.
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
精彩评论