‘onChange(of:perform:) was deprecated in iOS 17.0: Use onChange with a two or zero parameter action closure instead?
struct SudokuCellView: View { @Binding var value: Int? var onCommit: (Int?) -> Void var body: some View { TextField(“”, value: $value, formatter: NumberFormatter()) .multilineTextAlignment(.center) .keyboardType(.numberPad) .onChange(of: value) { newValue in // Validate new value and handle it if let number = newValue, number < 1 || number > 9 { value = nil } else […]
SWIFTUI – Scrollposition not updated
I Have been trying to figure this problem out but without success.
I need to update the map view based on the current acitivity that is shown in the scrollview.
the. .Ontap changes it well but scrolling seems to to update the scrollposition in the scrollview.