Reputation: 1278
Is there a way to determine if a user has selected a textfield and its active? I'm trying to implement some code this:
if(textFieldsomething.isActive)
{
}
Upvotes: 7
Views: 10854
Reputation: 33650
You can check to see if the text field is editing:
if (textFieldSomething.isEditing) {
...
}
See the UITextField class reference for details.
Upvotes: 12
Reputation: 5098
you can implement the textFieldDidBeginEditing function to catch the action event when the text field is being edited.
-(void)textFieldDidBeginEditing:(UITextField *)textField { //Keyboard becomes visible
//perform actions.
}
Upvotes: 12