Is Apple provided any documentation for picker view height restriction? like as per different stack conversation we can only set picker view height to 162.0, 180.0 and 216.0. So is this anywhere mentioned on apple developer portal. If yes, please let me know the link.
Asked
Active
Viewed 110 times
0
-
I suggest you to don't mess with UIPicker height changes ,even if you can find a balance now, it could broke in future releases. In the Apple documentation is not specified if you can or cannot do something with picker height. – Andrea Aug 03 '15 at 08:01
-
Hi, Thanks for suggestion, but I don't want to change the height. I just want a apple documentation link where they mention "We can't change the height". I have checked UIPickerView documentation https://developer.apple.com/library/prerelease/ios/documentation/UIKit/Reference/UIPickerViewDelegate_Protocol/index.html , but it is not mentioned about the height of picker view. – RohitK Aug 03 '15 at 08:24
2 Answers
0
-
Hey, I don't want to change the height of row. Instead I want documentation where Apple mentioned "Developer can't change the frame of UIPickerView". I checked out https://developer.apple.com/library/prerelease/ios/documentation/UIKit/Reference/UIPickerViewDelegate_Protocol/index.html, but didn't find it. – RohitK Aug 03 '15 at 08:27
-
I couldn't find where Apple mentions that we can not change UIPickerView's height. But, in its documentation, Apple has not provided us with any method through which we can change UIPickerView's height. – Munahil Aug 03 '15 at 08:31
-
It is like, Apple have not said it out loud (i.e mentioned it in its document) but by not providing any method, instead they have silently told that we can not change its height directly. – Munahil Aug 03 '15 at 08:35
0
You can try by SubClassing the UIPickerView and add the transform scale property. You can use the below code to transform pickerview:
- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
// Initialization code
self.transform = CGAffineTransformMakeScale(0.5, 0.5);
}
return self;
}
-(id)initWithCoder:(NSCoder *)aDecoder
{
self = [super initWithCoder:aDecoder];
if (self) {
self.transform = CGAffineTransformMakeScale(0.5, 0.5);
}
return self;
}
I can provide you the class as well in case you need it.

Ankit
- 15
- 5