简体   繁体   中英

UIPickerView for Iphone

I am creating a unit convertor app using a pickerview with three components and a plist..first one is category component and second and third are unit components. What i need is when i click an item in category component the remaining two components should get the units regarding that particular category. Can some one help me on this?

this is for selecting the same row in each component

here i did with first component do like that for ur logic

so change this method and u have to implement UIPickerViewDelegate

 - (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component{

            if (component == 1) {

                [pickerView selectRow:row inComponent:1 animated:YES];

                [pickerView selectRow:row inComponent:2 animated:YES];


            }


        }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM