Is there a way to determine if a user has sel开发者_如何学Pythonected a textfield and its active? I'm trying to implement some code this:
if(textFieldsomething.isActive)
{
}
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.
}
You can check to see if the text field is editing:
if (textFieldSomething.isEditing) {
...
}
See the UITextField class reference for details.
精彩评论