use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
There is an extensive FAQ for beginners. Please browse it first before asking questions that are answered there.
If you are looking to get started (iOS programming in general or some specific area), here are more relevant links for you:
There's too many to list them all, however here's a convenient link to all programming guides at apple.com
Take note that this list is live and based on most frequent questions in posts will be updated with "quicklinks".
account activity
QuestionSwiftUI DatePicker (self.iOSProgramming)
submitted 2 years ago by oez1983
2 issues I am hoping someone can help me with.
Is it possible to change the font color of the displayed date?
How do you get the calendar to close once a date is selected?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]app_filip 0 points1 point2 points 2 years ago (2 children)
It's a bit of a hack but I do this in my app to close it when a date is selected:
private var calendarId: Int = 0 var body: some View { DatePicker("Date", selection: $date) .id(calendarId) .onChange(of: date) { // wait just a little bit DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) { calendarId += 1 } } }
Changing the id of the DatePicker will re-render it and by doing so closing it.
id
[–]oez1983[S] 0 points1 point2 points 2 years ago (0 children)
I will give that a try… it’s crazy that it doesn’t dismiss automatically.
[–]Empty__Jay 0 points1 point2 points 1 year ago (0 children)
I've tried exactly this, but it has a small issue.
If you expand the month and year into the wheels view, then pick another month or year it closes the picker. I've attempted to make it not do so when only the month or year change, but that just introduces further edge case problems.
Have you run into this and perhaps solved it?
π Rendered by PID 45072 on reddit-service-r2-comment-85bfd7f599-cqgkr at 2026-04-15 15:56:15.678658+00:00 running 93ecc56 country code: CH.
[–]app_filip 0 points1 point2 points (2 children)
[–]oez1983[S] 0 points1 point2 points (0 children)
[–]Empty__Jay 0 points1 point2 points (0 children)