> On 26 Sep 2014, at 23:08, Herman Chan <herman...@gmail.com> wrote:
> 
> Hi all,
> 
> My set up is this.
> 
> 1.  present a view controller by calling presentViewController
> 2.  in the presented view controller (modal), I create a UITextView and set 
> it to be first responder when view has appeared.
> 3.  set up the leftbarNavItem to call dismissViewControllerAnimated (at this 
> moment the keyboard is raised).
> 4.  click on the left bar button and the modal view dismissed, but the 
> keyboard does not until a second later.
> 
> Here is a sample project I have on github, please take a look:  
> https://github.com/hermanccw/DismissBug
> 
> Anyone run into this problem on iOS 8?  I tested this same project on iOS 7 
> and it is fine.

I have the same issue. But I suspect it’s somewhat deliberate on Apple’s part. 
The view problem now doesn’t resign first responder status until it’s actually 
offscreen.

Fortunately there’s a pretty simple workaround: before dismissing the VC, force 
its views to end editing. That’ll kick off keyboard dismissal at the same time.


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to