1
(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;

通过将单个视图控制器分配为多个选择器的数据源和委托,我做错了吗?

4

1 回答 1

0

不,您可以在 signle ViewContoller 中分配多个 UIPicker 视图

于 2014-12-26T10:38:05.400 回答