当前位置: 动力学知识库 > 问答 > 编程问答 >

swift - iOS 10: Got a keyboard will show notification but keyboard was not on screen

问题描述:

I have a function to handle the UIKeyboardWillShow notification. What happens though is that when I segue out of that specific view controller to another one and then come back, if the keyboard was still on screen before it again calls the function even though it's not on screen anymore and shows this in the console: "got a keyboard will show notification but keyboard was not on screen." However, if I hide the keyboard while still in the initial view controller and then segue and come back, the function isn't called as expected. I've tried resignFirstResponder() in viewWillDisappear() but it still happens. Any help would be appreciated!

分享给朋友:
您可能感兴趣的文章:
随机阅读: