Instance Method

initWithOverlay:

Initializes and returns the overlay view and associates it with the specified overlay object.

Declaration

- (instancetype)initWithOverlay:(id<MKOverlay>)overlay;

Parameters

overlay

The overlay object to use when drawing the overlay on the map. This object provides the data needed to draw the overlay’s shape. This object is retained by the overlay view.

Return Value

An initialized overlay object.

Discussion

Upon initialization, the frame of the overlay view is set to CGRectZero. The map view sets the size and position of the view at display time, and you should not change those values yourself.

See Also