objective c - Ios 10 iPhone 7 Keyboard disappears when receiving notification -


i have uitexfield in chat view controller. when i'm editing answer in textfield, works fine execpt when receive push notification application.

this push notification handled controller , uiwindow displayed on top of view controller. keyboard disappears .. on iphone 7 , ios 10.

it works great on iphone 6 , ios 9.3 instance.

i guess it's related ios 10 , uiwindow / uitextfield, don't know fix issue.

do have idea ?

thanks,

you can listen when application becomes active, either implementing

func applicationdidbecomeactive(_: uiapplication) 

in appdelegate, or through notification center

notificationcenter.default.addobserver(self, selector: #selector(appbecameactive), name: notification.name.uiapplicationdidbecomeactive, object: nil) 

when user closes notification window, receive event, , can make textfield active again

textfield.becomefirstresponder() 

to bring keyboard.


Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -