iPad popover textfield - resignFirstResponder doesn't dismiss keyboard

前端 未结 5 843
执笔经年
执笔经年 2021-02-13 06:15

I have two text fields email and password. The following code works fine when the fields are presented on a regular view but when they are on a popover, the resignFirstResponder

5条回答
  •  隐瞒了意图╮
    2021-02-13 06:50

    Check this question:

    Overriding disablesAutomaticKeyboardDismissal to return NO as below fixed the same problem of mine. You should put this code to your view controller, from which you initiate the keyboard:

    - (BOOL)disablesAutomaticKeyboardDismissal {
        return NO;
    }
    

提交回复
热议问题