Why UITextField becomeFirstResponder returns NO?

前端 未结 5 945
南笙
南笙 2021-01-18 06:48

This is my code:

while (true) {
    if ([identificationField becomeFirstResponder]) {

        NSLog(@\"finally!\");
        break;
    }
    else{
        i         


        
5条回答
  •  不要未来只要你来
    2021-01-18 07:28

    The call to canBecomeFirstResponder only checks if the receiver can itself become the first responder.

    The call to becomeFirstResponder will fail and return NO if either the receiver can't become first responder or if the current first responder can't resign.

提交回复
热议问题