Detecting tap inside a bezier path

后端 未结 4 638
生来不讨喜
生来不讨喜 2020-12-11 02:00

I have a UIView which is added as a subview to my view controller. I have drawn a bezier path on that view. My drawRect implementation is below

- (void)drawR         


        
4条回答
  •  情话喂你
    2020-12-11 03:07

    Try UIBezierPath's method :

    func contains(_ point: CGPoint) -> Bool
    

    Returns a Boolean value indicating whether the area enclosed by the receiver contains the specified point.

提交回复
热议问题