Q:

Creating Custom Control in ios

i Want to Create a Custom Circle View. 
I Have made a UIControl Sub Class, And Named as CircleView.  i have applied Corner Radius to make look like Circle. 
circleView  = [[CircleView alloc]initWithFrame:CGRectmake(0, 0 , 200, 200)];

Next I have Imported to Root View Controller, allocated with frame to Show on My Root View Controller.  So My Problem is ,
When i Touch to Corner of the View its Reacting to the Events. Why..?  is That Possible add Events With in the Circle of Radius. 

A:

A view is always a rectangle regardless of what shape you render within that rectangle. 
To make your circle view only respond to events within the circle, you need to override the hitTest:withEvent: method. 
- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event {
    if (/* point is within circle */) {
        return self;
    } else {
        return nil;
    }
}

