Posts

Showing posts from February, 2014

Virtual Keyboard in iOS - part 1

Image
When you are a developer for more than one platform, you might find that what is considered basic or pre-built in one, it’s incomplete or completely missing in another one. This entry is about fixing some issues with the virtual keyboard on iOS; especially when it hides your text fields or keeps the input focus. Xamarin Studio/Mono and XCode were used for this example. Hiding the keyboard Tapping inside the TextField will show the keyboard, but it won't be possible to get rid of it by tapping outside or pressing “RETURN” on it. This is something pre-built in Silverlight for Windows Phone. Tapping outside of the textbox or hitting the “back” key will hide the keyboard. But well, there is no back key on the iPhone. So let’s start by creating and extension method that we will use in the rest of the solution. The method will return the view that is the first responder or the “active” one. public static class Extensions { public static UIView FirstRespon...