SOF
SOF

Reputation: 457

How to Reduce the size of date Picker control on view iPhone

I am working on Date Picker and facing a problem of customizing the size .How to reduce the size for date picker for example height.

Upvotes: 6

Views: 8781

Answers (3)

Farini
Farini

Reputation: 933

There's another solution here. You can make it look smaller by using views on top of it. If it's the view you want to customize then you can copy everything, throw it on photoshop, redraw it and then throw your new "customized view" on top of the datePicker. Many developers are doing that actually with the standard picker. It takes a couple more programming lines to do that but you can make it look great with some visual effort... Just a suggestion.

Upvotes: 0

Ishu
Ishu

Reputation: 12787

Gene says correctly ,

Use standerd controls if you have any problem such as covering your control by the date picker view then resize your view and animate the view(change y coordinate for the view).

May this help you to short out your problem.

Upvotes: 0

Gene Goykhman
Gene Goykhman

Reputation: 2001

Some of the iOS standard controls, like the date picker, have very limited customization options available. I do not believe, for example, that you can change the height. You could develop your own date picker control (if you wanted it to look like a little calendar, for example, you would have to do that anyway). But consider some of the advantages of using the standard control exactly as it is:

  1. Less work than writing your own
  2. Already familiar to most iOS users so there won't be usability issues
  3. Very polished look and feel (for example, animations and sound effects)
  4. Sizing and dimensions are already tested to work well for a touch interface

And so on.

Upvotes: 8

Related Questions