A Replacement For ActionSheet Date Picker

ModalPickerViewController

In the earlier days of Xamarin.iOS development (up to iOS 7), one of the more useful recipes from the Xamarin Documentation was the ActionSheet Date Picker.  Adding a DatePicker as a subview of a UIActionSheet was a very convenient way to display a DatePicker to the user.  The Action Sheet would behave as it usually would, and you could modify it to slide from the bottom and only take up the bottom portion of the screen.  After the user selects the date and taps on “Done”, the ActionSheet would then slide back down.  Because of the behavior of the ActionSheet, this was a great way to provide a Modal Date Picker.  However, this recipe no longer works on iOS 8 due to “misuse” of the UIActionSheet.  I created an alternative, with full source code and sample app that replaces the ActionSheet Date Picker that is free to use.

(more…)