how can I show an image in map pin annotation?

后端 未结 3 1404
谎友^
谎友^ 2021-02-06 17:58

i have one view >> subview mkmapview .

in that i want to show image . ...my current image is like this.\"alt

3条回答
  •  灰色年华
    2021-02-06 18:51

    In your MKAnnotationView set the leftCalloutAccessoryView property

    leftCalloutAccessoryView The view to display on the left side of the standard callout bubble.

    @property (retain, nonatomic) UIView *leftCalloutAccessoryView Discussion The default value of this property is nil. The left callout view is typically used to display information about the annotation or to link to custom information provided by your application. The height of your view should be 32 pixels or less.

    If the view you specify is also a descendant of the UIControl class, you can use the map view’s delegate to receive notifications when your control is tapped. If it does not descend from UIControl, your view is responsible for handling any touch events within its bounds.

    Availability Available in iOS 3.0 and later. See Also @property canShowCallout Related Sample Code MapCallouts Declared In MKAnnotationView.h

    Apple docs

提交回复
热议问题