Search code examples
iphoneiosdatepickeruidatepicker

Resizing the WIDTH of UIDatePicker


Is it possible to CHANGE the WIDTH of the UIDatePicker ?

Im trying to do this programmatically, not via storyboards...iOS 6.1

Thanks.

Miles.


Solution

  • Yes. It's something you would change by setting the frame property.

    For example, if you wanted to increase the width of your datePicker object by 50 points:

    CGRect frame = self.datePicker.frame;
    frame.size.width += 50;
    [self.datePicker setFrame: frame];