开发者

how to determine if user pressed/selected a uitextfield?

开发者 https://www.devze.com 2023-02-20 19:12 出处:网络
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:

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消