i created a uipickerView dynamically when a button is tapped. but i cant get the selected row index from that dynamic pickerView. anybody knows how i can do that ? here how i created it.
Code:
altView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 400)];
[altView setBackgroundColor:[UIColor blackColor]];
UILabel *lblAlpha=[[UILabel alloc] initWithFrame:CGRectMake(0, 0, 320, 400)];
UIPickerView *pickerView=[[UIPickerView alloc] initWithFrame:CGRectMake(0, 0, 1, 216)];
[pickerView setBackgroundColor:[UIColor blueColor]];
[pickerView setShowsSelectionIndicator:YES];
[pickerView setDataSource:self];
pickerView.delegate=self;
[lblAlpha setBackgroundColor:[UIColor blackColor]];
[lblAlpha setAlpha:0.7];
[altView setBackgroundColor:[UIColor whiteColor]];
[altView addSubview:lblAlpha];
[altView addSubview:pickerView];
[self.view addSubview:altView];