Wednesday, 15 February 2012

monotouch - How do I use Xamarin iOS PickView to get the value? -



monotouch - How do I use Xamarin iOS PickView to get the value? -

i started messing around xamarin , i'm confused on 2 things. how utilize , if i'm searching right keywords help.

if want can native ios controls equivalent? sense if search "how value ios picker" answers specific objc-c. trying @ same properties have no luck. xamarin tutorials/ documentation sense disorganized , lacking. pickview isn't in list of ui controls have documentation.

i don't see events pickviewer either in xamarin studio. seek debug mode in xamarin ios every property seek , check seems might reply gives me "unknown member".

in example, have xamarin ios pickviewer , can't figure out how retrieve value or alert on row selected doesn't seem work. assume can apply list table well?

setting pickview list

public override void viewdidload () { base.viewdidload (); pvbankrollamounts.model = new uipickviewbetamountoptions (); }

so how can value of selected in ui? , what's best way find these answers on own? improve documentation somewhere?

xamarin ios sticks pretty closely apple ios model of doing things. beneficial able read obj-c (or swift) can @ apple's documentation , samples.

xamarin has pickerview sample part of sample app.

to selected item, need override selected method in model class. seems unusual c# perspective, mutual pattern in ios, commonly uses delegate pattern. create custom event , raise handled in parent class.

public override void selected (uipickerview picker, int row, int component) { // row selected row }

ios monotouch xamarin

No comments:

Post a Comment