I have a UIPickerView
displayed inside a UIPopoverController
. The dimensions of the UIPickerView
are: 320x216
. For some rea
The reason for the "squashed" picker view seems to be this line:
[pickerController setView:self.picker];
Instead, add the picker view as a subview:
[pickerController.view addSubview:picker];
Next, to fix the popover height, set popoverContentSize
before presenting it:
pickerPopover.popoverContentSize = picker.frame.size;
Also, fix the picker view's frame from this:
CGRectMake(0, self.view.bounds.size.height+44, 320, 216)
to this:
CGRectMake(0, 0, 320, 216)