iOS Developer Library

Developer

MapKit Framework Reference MKCircleRenderer Class Reference

Options
Deployment Target:

On This Page
Language:

MKCircleRenderer

Inherits From


Conforms To


Import Statement


Swift

import MapKit

Objective-C

@import MapKit;

Availability


Available in iOS 7.0 and later

The MKCircleRenderer class provides a visual representation for an MKCircle overlay object. This renderer draws by filling and stroking the circle represented by the overlay object. You can change the color and other drawing attributes of the circle by modifying the properties inherited from the parent class. You typically use this class as is and do not subclass it.

You create an instance of this class in your map view delegate’s mapView:rendererForOverlay: method.

  • Initializes and returns a new overlay view using the specified circle overlay object.

    Declaration

    Swift

    init!(circle circle: MKCircle!)

    Objective-C

    - (instancetype)initWithCircle:(MKCircle *)circle

    Parameters

    circle

    The circle overlay containing the information about the circular area to be drawn. The renderer maintains a strong reference to the object you provide. This parameter must not be nil.

    Return Value

    An initialized circle renderer object.

    Import Statement

    Objective-C

    @import MapKit;

    Swift

    import MapKit

    Availability

    Available in iOS 7.0 and later

  • circle circle Property

    The circle overlay object that contains the information used to draw the overlay. (read-only)

    Declaration

    Swift

    var circle: MKCircle! { get }

    Objective-C

    @property(nonatomic, readonly) MKCircle *circle

    Import Statement

    Objective-C

    @import MapKit;

    Swift

    import MapKit

    Availability

    Available in iOS 7.0 and later