Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有蒙面 UIView 。用蓝点查看。绿色圆圈区域被屏蔽。我不想接触那个区域。我只想接触视图的可见层。
请在您的触摸方法中选择触摸视图代替 self.view
可能有帮助
尝试创建蒙版区域的 CGPath,然后检查触摸是否落在您的蒙版区域中,如下所示:
UIBezierPath *p = [UIBezierPath bezierPathWithCGPath:myCGPath];
BOOL isInPath = [p containsPoint:myCGPoint];
希望这可以帮助 !!!