I am attempting to draw a 'circular/oval/ellipse' custom UIView in iOS (using swift)
I am drawing the UIView using a subclass as follows
import Foundation
import UIKit
class CustomEllipse: UIView {
override func drawRect(rect: CGRect)
{
var ovalPath = UIBezierPath(ovalInRect: rect)
UIColor.grayColor().setFill()
ovalPath.fill()
}
}
This produces output similar to the following

I now need to define a clickable area for this 'CustomEllipse'.
However, when I define a UITapGestureRecognizer for the 'CustomElipse', the black corners seen above are clickable by default.
Is there a way to make just the grey ellipse clickable?