objective c - iOS UIPickerView how to get the selected row outside the delegate method -


i know uipickerview has method:

- (void)pickerview:(uipickerview *)pickerview       didselectrow:(nsinteger)row        incomponent:(nsinteger)component 

but inside method, want selected row of other components. how on earth can that?

you can selected row number anywhere using selectedrowincomponent method of uipickerview.

such like

nsstring *yourselectedtitle = [self.yourarrayname objectatindex:[self.yourpickername selectedrowincomponent:0]]; nslog(@"%@", yourselectedtitle); 

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

IIS->Tomcat Redirect: multiple worker with default -