-1

Masked image

I have Masked UIView . View with blue dots. Green circle Area is masked off.I dont want to get touches on that area.i just want to get touches on visible layer of the View.

Community
  • 1
  • 1
Jawad Ali
  • 13,556
  • 3
  • 32
  • 49

2 Answers2

1

Please select touch view in your touch method in place of self.view

May be it helps

Mahendra
  • 425
  • 2
  • 9
0

Try creating a CGPath of the masked area & then check if the touch falls in ur masked area or not like this :

UIBezierPath *p = [UIBezierPath bezierPathWithCGPath:myCGPath];

BOOL isInPath = [p containsPoint:myCGPoint];

Hope this Helps !!!

arun.s
  • 1,528
  • 9
  • 12