Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS 8 Keyboard Dismissed delay after modal view controller is dismissed

In iOS 8+ I noticed that if you have an textfield that is currently the firstResponder in a view controller that was presented, when the view controller is dismissed, the keyboard hangs around for around 1 second before being dismissed.

This occurs for both iOS 8.0 and 8.1 and not 7.1.

Any ideas why this is?

like image 352
micap Avatar asked Dec 04 '14 23:12

micap


1 Answers

According to this, in iOS 8 it seems the view doesn’t resign first responder status until it’s actually offscreen.

http://prod.lists.apple.com/archives/cocoa-dev/2014/Sep/msg00391.html

Our workaround is to call [self.view endEditing:YES] in -viewWillDisappear.

like image 103
micap Avatar answered Oct 21 '22 22:10

micap