I’m trying to change PickerView’s height
self.pickerView = [[UIPickerView alloc] init];
self.pickerView.frame = CGRectMake(0, 0, frame.size.width, frame.size.height);
Xcode log shows the following message:
-[UIPickerView setFrame:]: invalid height value 274.0 pinned to 216.0
How can I change its height?
here are only
threevalidheightsforUIPickerView(162.0, 180.0 and 216.0).You can use the
CGAffineTransformMakeTranslationandCGAffineTransformMakeScalefunctions to properly fit the picker to your convenience.Example:
The above code
changetheheightofpickerview to halfandre-positionit to the exact(Left-x1, Top-y1)position.Refer more here.