I was able to solve the problem
slider(value: $value)
... ... ...
// add guard
guard variable < sliderValueMin && variable > sliderValueMax else{
value = variable
}
only enter when the variable is within the range.
solve the problem.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: