Как предоставить этому представлению средства выбора источник данных

Здесь я программно добавляю окно выбора

 - (void)viewDidLoad {
        [super viewDidLoad];
        CGRect pickerFrame = CGRectMake(0,280,321,200);

        UIPickerView *myPickerView = [[UIPickerView alloc] init]; //Not sure if this is the proper allocation/initialization procedure

        //Set up the picker view as you need it

        //Set up the display frame
        myPickerView.frame = pickerFrame; //I recommend using IB just to get the proper width/height dimensions

        //Add the picker to the view
        [self.view addSubview:myPickerView];
    }

Но теперь мне нужно, чтобы он отображал контент и каким-то образом узнавал, когда он изменяется и на какое значение он изменился. Как мне это сделать?

5
задан Michael 21 March 2011 в 20:02
поделиться