In my iOS app, I've UITextfield at the bottom of the view. So, when user starts entering text, I'm sliding the view up so that users can see what they are typing.
While entering text, view moves upwards, then press home button and the app goes to background.
Now tap on the icon of the app and it brings the app to foreground
Now I noticed that view comes back to original position (X=0, Y=0) but keyboard is still visible.
How to hide the keyboard when the app comes to foreground.
I tried to hide the keyboard in viewWillAppear and viewWillDisappear. It didn't work.