I am having an issue when using a slider, that if the value between the max and min is too high, the animation breaks if the step is set to low.
Slider(value: $amountToAdd, in: -1500...1500, step: 10)
These seems odd since if you remove the step, its capable of going through the equivalent of 1 step with no issue.
Slider(value: $amountToAdd, in: -1500...1500)
Is there a way around this limitation, or is this a bug in swiftui with the slider? I do not see anything in the documentation that there is a limit.
Post
Replies
Boosts
Views
Activity
I am trying to understand how much I can do with shield actions, if anything.
So at its basic, the shield action has 3 options, none, defer, and close.
I believe defer is used to rebuild the shield if needed (for example, a parent allowing their child to open the app). Can this be used as a button to just straight up bypass the shield? Like if a user taps button one, it would run shield action close, if taps button two, it would bypass the shield and open the app? If so, how would one bypass since t he handler requires the shield action options?
override func handle(action: ShieldAction, for application: ApplicationToken, completionHandler: @escaping (ShieldActionResponse) -> Void) {
switch action {
case .primaryButtonPressed:
completionHandler(.close)
case .secondaryButtonPressed:
completionHandler(.defer)
@unknown default:
fatalError()
}
}