vendredi 8 mai 2015

How do I add a date of birth UIDatePicker to UITextField?

I request the users date of birth on the sign up screen of my application. I can't figure out how to get a date of birth UIDatePicker to display. I tried using the following code but it only displays the date and time:

 UIDatePicker *dp = [[UIDatePicker alloc]init];
_textBirthday.inputView = dp;

Also, how would I set it so it only accepts users born after a certain year?

Aucun commentaire:

Enregistrer un commentaire