when will [UIViewController disablesAutomaticKeyboardDismissal] be called?
any ex开发者_运维知识库ample for how to use this? I can't understand the document.
This is only about a view controller presented using UIModalPresentationFormSheet
. In that case, a text field resigning first responder will not cause the keyboard to be dismissed unless you override disablesAutomaticKeyboardDismissal
to return NO.
The rest of the framework will call it at an undefined time before they need to know if the view controller in question disables automatic keyboard dismissal. Since your implementation of a UIViewController
subclass (where you are meant to override it) should return either always YES
or always NO
, it doesn't matter when it's called.
精彩评论