• behance
  • gitHub
  • google
  • linkedin
  • twitter
iOS Keyboard Handling in MvvmCross View Controller

iOS Keyboard Handling in MvvmCross View Controller

I’ve just had to handle the situation where a user taps on a text editor control in an iOS view and the keyboard auto appears.

Whilst this is obviously great for the user it leaves a lot to be desired in the full editing life-cycle in terms of UX.  Also In some situations there isn’t a dedicated keyboard dismiss button available to the user to remove the keyboard from the UI.  Nor will a view automatically handle the fact that they keyboard will obscure the very control the user tapped on meaning they cannot even see the text they are adding or editing.

Personally I find it quite amazing that in an OS at major revision 9 this is entirely left to the individual developer to handle properly.  I’m sure Apple have their reasons but this should be default behaviour on the platform in my opinion.  This is in fact a number of things I find missing in iOS.  Whilst it’s true that this arguably leaves things flexible in terms of not dictating how things should be done it does mean that there ends up being a plethora of potential solutions out there, also possibly of varying quality and reliability.

Anyway, I have found a fantastic solution to this and have a GitHub GIST available in the shape of extension methods and an MvvmCross base view controller implementation.

GitHub GIST


Original credits go to GuillermoGutierrez

Leave a reply

*