Post

Replies

Boosts

Views

Activity

SWIFTUI DatePicker with Calendar identifier
does anyone know how to configure Swift DatePicker using a set Calendar identifier so that the calendar display on the date picker is in identified months and dates (e.g., Hebrew, Ethiopic, etc.) without setting an environmental locale? Struct DateView: View { @State var selectedDate = Date() let dateFormatter: DateFormatter = { let formatter = DateFormatter() formatter.dateStyle = .medium return formatter }() var body: some View { DatePicker("Please enter a date", selection: $selectedDate, displayedComponents: .date) .datePickerStyle(WheelDatePickerStyle()) Divider() Text ("You selected \(selectedDate,formatter: dateFormatter)") Spacer() } }
1
0
1.3k
Apr ’22
scrollto in ScrollReader
Hi! I'm trying to implement a scrollto to a particular .id depending on a preferences state, but the following won't return a view.    ScrollView (.vertical) {                     if (preferences.scrollPosition = 1) {                         withAnimation {                             proxy.scrollTo(2)                         }                     }
1
0
247
Dec ’21