Search code examples
iosiphoneipadmkmapview

How to reduce the thickness of MKOverlay circle?


I have added a circle to MKMapView using below code in delegate function:

-(MKOverlayRenderer *)mapView:(MKMapView *)mapView rendererForOverlay:(id<MKOverlay>)overlay{

    MKCircleRenderer *circleView = [[MKCircleRenderer alloc] initWithOverlay:overlay];
    circleView.strokeColor = [UIColor blueColor];

    return circleView;
}

I want to reduce the thickness, can anyone help?


Solution

  • I found a solution for it, there is a property for increase/decrease line width in MKCircleRenderer class itself:

    circleView.lineWidth = 2;