0

I'm using UIDatePicker in my app.

In iOS 5 I can change the width and height of the UIDatePicker, however in iOS 6 I cannot. I am using the following code:

CGRect pickerFrame = CGRectMake(0, 90, 100, 100);
datePicker = [[UIDatePicker alloc] initWithFrame:pickerFrame];
datePicker.datePickerMode = UIDatePickerModeDate;

Is there anything extra I have to do for this?

Muddu Patil
  • 713
  • 1
  • 11
  • 24
  • possible duplicate of [different size for DatePicker objective-C](http://stackoverflow.com/questions/12138101/different-size-for-datepicker-objective-c) – Pondlife Nov 07 '12 at 22:33

1 Answers1

1

UIDatePicker displays a UIPickerView. Unfortunately, a UIPickerView's size cannot be changed.

Sure, you could try to trick it by using transforms, but please don't. Not only will it be a headache to you, it'll be harder to use, ugly, fuzzy, and go against human interface guidelines (by making touch targets too small).

fzwo
  • 9,842
  • 3
  • 37
  • 57