iOS Developer Library

Developer

MapKit Framework Reference MKShape Class Reference

Options
Deployment Target:

On This Page
Language:

MKShape

The MKShape class is an abstract class that defines the basic properties for all shape-based annotation objects. This class must be subclassed and cannot be used as is. Subclasses are responsible for defining the geometry of the shape and providing an appropriate value for the coordinate property inherited from the MKAnnotation protocol.

Conforms To


Import Statement


Swift

import MapKit

Objective-C

@import MapKit;

Availability


Available in iOS 4.0 and later.
  • title title Property

    The title of the shape annotation.

    Declaration

    Swift

    var title: String!

    Objective-C

    @property(nonatomic, copy) NSString *title

    Discussion

    This string is displayed in the callout for the associated annotation view. The default value of this property is nil.

    Import Statement

    Objective-C

    @import MapKit;

    Swift

    import MapKit

    Availability

    Available in iOS 4.0 and later.

  • subtitle subtitle Property

    The subtitle of the shape annotation.

    Declaration

    Swift

    var subtitle: String!

    Objective-C

    @property(nonatomic, copy) NSString *subtitle

    Discussion

    This string is displayed in the callout for the associated annotation view. The default value of this property is nil.

    Import Statement

    Objective-C

    @import MapKit;

    Swift

    import MapKit

    Availability

    Available in iOS 4.0 and later.