开发者

Creating a custom uidatepicker - it takes up too much space!

开发者 https://www.devze.com 2023-01-08 05:10 出处:网络
I would LOOOOVE to have the use of a UIDatePicker that is just one row displayed instead of three.   Three rows take up way too much real-estate!

I would LOOOOVE to have the use of a UIDatePicker that is just one row displayed instead of three.   Three rows take up way too much real-estate!   HELP!!!   I am able to rotate and resize开发者_如何学编程 the control without any great stress, but have yet to figure out how to only display the one row. This is not what I'm chasing right this moment.

Any direction would be appreciated ;)


The standard pickers are all that big. No way to change this behavior. Although you could place other components on top of it, this would probably not look great, and it's hard to use, as you need height to operate the wheels.

Reducing the standard picker to one row would also irritate users, and it could be problematic in the review process.

So if you need a one-line-date-picker view, you have to roll your own.


Hope this helps. You can use a UIPicker to create a datepicker. Implementation can be found here. https://kmdarshan.wordpress.com/2015/05/03/creating-a-ios-type-date-picker-with-custom-text-in-it/


I don't think, that using a 1-dimensional picker for date would irritate users or give your problems in the review process. But you will have to do your own date picker by defining your own behavior to a UIPickerView

0

精彩评论

暂无评论...
验证码 换一张
取 消