문제

I want to set the datepicker in XCode-Interface Builder to just use the rollers of the "day" and "month"? I've search, but everyone want to keep month and year but not the day. I know that we could set the datePicker Mode to "date" but the year appear. So, do you know how we could implement this ? Another problem, i want to show the day name in my textField, i don't know how we can make that.

my text field is like that :

Monday 1 june

도움이 되었습니까?

해결책

UIDatePicker doesn't support this. You will need to use UIPickerView and add whatever components you need with whatever values should be shown.

To format the date in your text field, use an NSDateFormatter to format the date as needed.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top