IOS16 UIPanGestureRecognizer

This function works fine in iOS 15 but not in iOS 16. In iOS 16 even though you drag your finger only adds or subtracts once. With 0.01 and 0.02 does not work but with 0.03 it does.

@objc func pan(recognizer: UIPanGestureRecognizer) {
        if recognizer.state == UIGestureRecognizer.State.changed || recognizer.state == UIGestureRecognizer.State.ended {
            let velocity:CGPoint = recognizer.velocity(in: self.view)
            if velocity.y > 0 {
                UIScreen.main.brightness -= 0.01
            } else {
                UIScreen.main.brightness += 0.01
            }
        }
    }

Thank you very much for your reply.

Minimum number that can be set 0.025001 ?

The minimum number it supports is 0.025001

The minimum number it supports is 0.025001

The minimum number it supports is 0.025001

IOS16 UIPanGestureRecognizer
 
 
Q