having trouble to assign multiple picker views to a single view controller

55 views Asked by At
(void)viewDidLoad {
    [super viewDidLoad];
    picker1Data=@[@1,@2,@3,@4,@5];
    picker2Data=@[@"a",@"b",@"c",@"d",@"e",@"f"];
    self.picker1.dataSource=self;
    self.picker1.delegate=self;
    self.picker2.dataSource=self;
    self.picker2.delegate=self;

Am i doing wrong by assigning single view controller as the datasource and delegate of multiple pickers?

1

There are 1 answers

0
Girijesh Kumar On

No you can assign multiple UIPicker View in signgle ViewContoller