How to find out what UITextField caused a UIKeyboardWillShowNotification?

后端 未结 4 1068
春和景丽
春和景丽 2021-02-19 04:42

I am trying to use a customized keyboard in my application, but I am hitting problems when trying to restrict it to one particular UITextField.

I based my code on this X

4条回答
  •  不要未来只要你来
    2021-02-19 05:26

    Couldn't get any of the above to work. Had to do it manually:

    if ([companyName isFirstResponder]) {
        // ...............
    }
    else if ([notes isFirstResponder]) {
        //.............
        }
    }
    

提交回复
热议问题