Contents

convert(_:toRectTo:)

Converts a map region to a rectangle in the specified view.

Declaration

func convert(_ region: MKCoordinateRegion, toRectTo view: UIView?) -> CGRect
func convert(_ region: MKCoordinateRegion, toRectTo view: NSView?) -> CGRect

Parameters

  • region:

    The map region that you want to find the corresponding view rectangle for.

  • view:

    The view where you want to locate the specified map region. If this parameter is nil, the method specifies the returned rectangle in the window’s coordinate system. If view isn’t nil, the rectangle belongs to the same window as the map view.

Return Value

The rectangle corresponding to the specified map region.

See Also

Converting map coordinates