0

I have this design here : https://i.stack.imgur.com/Y8gRp.jpg

I would like to allocate the left half of the screen(splitting vertically) to panning up and down for the blue bars and allocate the right half of the screen(splitting vertically) to panning up and down for the red bars.

I can already use UIPanGestureRecognizer, however, I just need help making the region in which if the user pans on the right side of the screen, "this" happens and if the user pans on the left side, "this" happens.

A friend of mine recommended using UIBezierPath. Could someone help me out? Code will be much appreciated!

Anton O.
  • 653
  • 7
  • 27
Nadal Alyafaie
  • 329
  • 1
  • 3
  • 12

1 Answers1

1

I looks like it would be easier to have two UIPanGestureRecognizers.

In your view, you can add a subview that take up the left half on the screen that contains the blue bars and the microphone and add another subview that is on the right half of the screen containing the red bars and the music icon.

Then you can create two separate UIPanGestureRecognizers and add one to each of the views. Then each side will have its one recognizer that will take care of the side detection for you.

Craig Siemens
  • 12,942
  • 1
  • 34
  • 51