I have a UIPickerview inside a ActionSheet dateSheet
that gets the demographic of the user. Here is my code.
UIPickerView *picker=[[UIPickerView alloc] initWithFrame:CGRectMake(0,125,320,216)];
picker.tag = 1;
picker.delegate=self;
picker.showsSelectionIndicator=YES;
[dateSheet addSubview:picker];
[dateSheet showInView:self.view];
[dateSheet setFrame:CGRectMake(0,220,320,312)];
I changed the code from this:
UIPickerView *picker=[[UIPickerView alloc] initWithFrame:CGRectMake(0,95,320,216)];
picker.tag = 1;
picker.delegate=self;
picker.showsSelectionIndicator=YES;
[dateSheet addSubview:picker];
[dateSheet showInView:self.view];
[dateSheet setFrame:CGRectMake(0, 168, 320, 312)];
But either way now on the iPad simulator it looks like this
Here is where I set my pickerviews data
-(NSString *)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component{
return [pickerdata objectAtIndex:row];
}