keyboardWillShow called twice

前端 未结 3 743
暗喜
暗喜 2021-01-02 07:32

I have a view with keyboard notifications such as keyboardWillShow and keyboardWillHide

All the codes handles with the notification I use i

3条回答
  •  执笔经年
    2021-01-02 07:44

    You might want to post your code.

    If your methods are being called twice, most likely, you are registering for the keyboard notifications multiple times and not removing the observer when you think you are.

    Add your observer in viewWillAppear: and remove it in viewWillDisappear: and see what happens.

提交回复
热议问题