swift - DatePicker Control in IOS with large Daterange -


i looking date picker control choose date between 10'000 b.c. till today (2015). can use uidatepicker ( didn't find information uidatepicker ?

i mean allow date range of 12015 years ? or there way achieve standard controls ? or have create own control ?

you can use uipickerview , set (uipickerviewdelegate delegate methods)

- (nsinteger)numberofcomponentsinpickerview:(uipickerview*)pickerview

to whatever number want - ie. 2 if want able choose month , year. can set how many values should in each component setting up

- (nsinteger)pickerview:(uipickerview*)pickerview numberofrowsincomponent:(nsinteger)component

and populate arrays

- (nsstring *)pickerview:(uipickerview *)pickerview titleforrow:(nsinteger)row forcomponent:(nsinteger)component

or (if want customize bit more)

- (uiview*)pickerview:(uipickerview*)pickerview viewforrow:(nsinteger)row forcomponent:(nsinteger)component reusingview:(uiview*)view


Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -