开发者

how to determine if user pressed/selected a uitextfield?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜