Re: dismissViewControllerAnimated bug in ios 8
Re: dismissViewControllerAnimated bug in ios 8
- Subject: Re: dismissViewControllerAnimated bug in ios 8
- From: Mike Abdullah <email@hidden>
- Date: Sun, 28 Sep 2014 19:59:49 +0100
> On 26 Sep 2014, at 23:08, Herman Chan <email@hidden> 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 (email@hidden)
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:
This email sent to email@hidden