Swipe to Adjust Image Effect

Viewed 25

I am making an iOS app that allows users to edit images (Sharpen, Brightness, etc.). I am using UIKit, I know how to create sliders to adjust the effect for an image. I see other applications where users can swipe anywhere across the entire screen to adjust the effects. For example, increase brightness by swiping right anywhere on the screen. How is this done? Should I detect swiping gesture and then use that to control a slider in the background? I understand the core image part of it, but the swiping gesture part confuses me. Thanks in advance.

1 Answers

What you are describing is a pan gesture, not a swipe gesture. (Pan gestures are continuous. Swipes are single-shot gestures.)

You should look up UIPanGestureRecognizer. You probably want to attach a pan gesture recognizer to the view that contains the area on which you want the user to be able to drag.

Related