Every time you have to ask your user "What's your favourite colour" or "What is the air-speed velocity of an unladen swallow?" from within your iOS application, you have to ask yourself "Wait, will the field still be visible with the virtual keyboard displayed ?"
I don't know how you do it (experience sharing is welcome), but me, I do it this way:
public override void ViewDidLoad ()
{
base.ViewDidLoad ();
//Set Bindings and Commands
placeField.Bind (ViewModel, "Place");
sendButton.Command (ViewModel.SendCommand);
busyIndicator.Bind (ViewModel, "IsBusy");
//Slide the view on keyboard show/hide
placeField.EditingDidBegin += (sender, e) => {
UIView.BeginAnimations ("keyboardslide");
UIView.SetAnimationCurve (UIViewAnimationCurve.EaseInOut);
UIView.SetAnimationDuration (.3f);
var frame = View.Frame;
frame.Y = -100;
View.Frame = frame;
UIView.CommitAnimations();
};
placeField.EditingDidEnd += (sender, e) => {
UIView.BeginAnimations ("keyboardslide");
UIView.SetAnimationCurve (UIViewAnimationCurve.EaseInOut);
UIView.SetAnimationDuration (.3f);
var frame = View.Frame;
frame.Y = 20;
View.Frame = frame;
UIView.CommitAnimations();
};
}
