With VoiceOver, you can swipe up/down to increase/decrease the value of adjustable components. You need to implement accessibilityIncrement() and accessibilityDecrement() accordingly, and configure an accessibility value that makes sense.

override func accessibilityIncrement() {
guard value < 5 else { return }
value += 1
accessibilityValue = "\(value) of 5"
sendActions(for: .valueChanged)
}
override func accessibilityDecrement() {
guard value > 1 else { return }
value -= 1
accessibilityValue = "\(value) of 5"
sendActions(for: .valueChanged)
}Links to the official documentation:
You may also find interesting...

In UIKit, to create an adjustable component we need to add the adjustable trait and override both accessibilityIncrement() and accessibilityDecrement(). In SwiftUI, everything you need is bundled in the accessibilityAdjustableAction(_:) modifier.

Accessibility values are about state. Using them appropriately will make the experience better for Voice Control users. Think of a repeat button (values could be: off, one or all songs) or a notifications tab (value could be: x new items). For more on accessibility values, check out this fantastic blog post from @MobileA11y with info on the APIs (UIKit, SwiftUI), accessibility attributed values, WCAG, or some more examples (text in a text field, value on a stepper or slider). https://mobilea11y.com/blog/accessibility-values/

Let's quickly remember a few of VoiceOver's most important gestures that will let you do some of the most basic actions including selection, interacting, navigating, and scrolling. And Apple has a great video: https://m.youtube.com/watch?v=qDm7GiKra28&feature=youtu.be