0

Wheres the custom picker element for monotouch dialog (Xamarin.IOS)?

// update

UIPickerView would be a wonderful element to have as a monotouch dialog element along with UIActionSheet.

Instead I journeyed into building one by hand and then attempted to fit it into an UIActionSheet. Was couple of days work (I'm a noob) but got stuck trying to clean up the aesthetics of it (think I'll just stick with a 'ok' solution of embedding the picker inside a table for now).

Just in case anyone else embarks on this adventure here's a link to make your picker:
https://www.youtube.com/watch?v=lXa9WZMcmoE

Here's a link to how to setup a UIActionSheet: http://monotouch.2284126.n4.nabble.com/UIActionSheet-Presenting-action-sheet-clipped-by-its-superview-warning-td3897607.html

// another update

Although not a custom picker element using MT.D, you can sort of have a popup picker by linking the input view of a control (view object i.e. text field) and set it's input view property to the picker. The picker slides in from bottom whenever you click this control. Think I just have to implement a custom view with my own picker and a cancel button somewhere...hmmmm:

http://nomtek.com/tips-for-developers/working-with-pickers/

fractal
  • 1,649
  • 17
  • 31

1 Answers1

1

Your update is correct - you'll want to create a custom MT.D element that inherits from EntryElement, override the method that creates the UITextField and set the field's InputView to an input view of your choice. I actually just wrote a tutorial on this: Custom MT.D Input View & Element

Community
  • 1
  • 1
Bradley Gore
  • 338
  • 2
  • 12