public class MKAnnotationView extends UIView
NoIntrinsicMetric
Constructor and Description |
---|
MKAnnotationView(MKAnnotation annotation,
String reuseIdentifier)
Constructs a MKAnnotationView with the specified parameters.
|
Modifier and Type | Method and Description |
---|---|
MKAnnotation |
annotation()
Returns the annotation object of this view.
|
CGPoint |
calloutOffset()
Returns the offset of the default map accessory view expressed in points.
|
boolean |
canShowCallout()
Returns a Boolean that defines whether the annotation view can display
additional information on the default map accessory view.
|
CGPoint |
centerOffset()
Returns the offset of the annotation view expressed in points.
|
int |
dragState()
Returns the current drag state of the annotation.
|
UIImage |
image()
Returns the image of the annotation view.
|
boolean |
isDraggable()
Returns a Boolean that shows whether the annotation is draggable.
|
boolean |
isEnabled()
Returns a Boolean that shows whether the annotation is enabled.
|
boolean |
isHighlighted()
Returns a Boolean that defines whether the annotation view is
highlighted.
|
boolean |
isSelected()
Returns the selection state of the annotation view.
|
UIView |
leftCalloutAccessoryView()
Returns the view that is displayed on the left side of the default map
accessory view.
|
void |
prepareForReuse()
Called when the view is about to be used again.
|
String |
reuseIdentifier()
Returns a String that defines whether the visibility of this annotation.
|
UIView |
rightCalloutAccessoryView()
Returns the view that is displayed on the right side of the default map
accessory view.
|
void |
setAnnotation(MKAnnotation annotation)
Sets annotation object of this view.
|
void |
setCalloutOffset(CGPoint calloutOffset)
Sets the offset of the default map accessory view expressed in points.
|
void |
setCanShowCallout(boolean canShowCallout)
Returns a Boolean that defines whether the annotation view can display
additional information on the default map accessory view.
|
void |
setCenterOffset(CGPoint centerOffset)
Sets the offset of the annotation view expressed in points.
|
void |
setDraggable(boolean draggable)
Sets a Boolean that defines whether the annotation is draggable.
|
void |
setDragState(int MKAnnotationViewDragState)
Sets the current drag state of the annotation.
|
void |
setDragState(int MKAnnotationViewDragState,
boolean animated)
Sets the current drag state of the annotation using animation or not.
|
void |
setEnabled(boolean enabled)
Returns a Boolean that defines whether the annotation is enabled.
|
void |
setHighlighted(boolean highlighted)
Sets a Boolean that defines whether the annotation view is highlighted.
|
void |
setImage(UIImage image)
Sets the image of the annotation view.
|
void |
setLeftCalloutAccessoryView(UIView leftCalloutAccessoryView)
Sets the view to be displayed on the left side of the default map
accessory view.
|
void |
setRightCalloutAccessoryView(UIView rightCalloutAccessoryView)
Sets the view to be displayed on the right side of the default map
accessory view.
|
void |
setSelected(boolean selected)
Sets the selection state of the annotation view.
|
void |
setSelected(boolean selected,
boolean animated)
Sets the selection state of the annotation view using animation or not.
|
accessibilityIdentifier, addConstraint, addConstraints, addGestureRecognizer, addLayoutGuide, addSubview, alpha, animateWithDuration, animateWithDuration, animateWithDuration, areAnimationsEnabled, autoresizesSubviews, autoresizingMask, backgroundColor, bottomAnchor, bounds, bringSubviewToFront, center, centerXAnchor, centerYAnchor, clipsToBounds, constraints, contentCompressionResistancePriorityForAxis, contentHuggingPriorityForAxis, contentMode, convertPointFromView, convertPointToView, convertRectFromView, convertRectToView, didAddSubview, didMoveToSuperview, didMoveToWindow, drawRect, frame, gestureRecognizers, heightAnchor, hitTest, insertSubview, insetsLayoutMarginsFromSafeArea, intrinsicContentSize, invalidateIntrinsicContentSize, isHidden, isMultipleTouchEnabled, isOpaque, isUserInteractionEnabled, layer, layoutIfNeeded, layoutMargins, layoutMarginsDidChange, layoutMarginsGuide, layoutSubviews, leadingAnchor, leftAnchor, maskView, needsUpdateConstraints, nextResponder, overrideUserInterfaceStyle, pointInside, preservesSuperviewLayoutMargins, removeConstraint, removeConstraints, removeFromSuperview, removeGestureRecognizer, removeLayoutGuide, requiresConstraintBasedLayout, restorationIdentifier, rightAnchor, safeAreaInsets, safeAreaLayoutGuide, sendSubviewToBack, setAccessibilityIdentifier, setAlpha, setAnimationBeginsFromCurrentState, setAnimationCurve, setAnimationDelay, setAnimationDuration, setAnimationRepeatAutoreverses, setAnimationRepeatCount, setAnimationsEnabled, setAnimationStartDate, setAutoresizesSubviews, setAutoresizingMask, setBackgroundColor, setBounds, setCenter, setClearsContextBeforeDrawing, setClipsToBounds, setContentCompressionResistancePriority, setContentHuggingPriority, setContentMode, setFrame, setGestureRecognizers, setHidden, setInsetsLayoutMarginsFromSafeArea, setLayoutMargins, setMaskView, setMultipleTouchEnabled, setNeedsDisplay, setNeedsLayout, setNeedsUpdateConstraints, setOpaque, setOverrideUserInterfaceStyle, setPreservesSuperviewLayoutMargins, setRestorationIdentifier, setTag, setTintAdjustmentMode, setTintColor, setTransform, setTranslatesAutoresizingMaskIntoConstraints, setUserInteractionEnabled, sizeThatFits, sizeToFit, subviews, superview, tag, tintAdjustmentMode, tintColor, tintColorDidChange, topAnchor, toString, trailingAnchor, transform, transitionWithView, translatesAutoresizingMaskIntoConstraints, updateConstraints, updateConstraintsIfNeeded, userInterfaceLayoutDirection, viewForFirstBaselineLayout, viewForLastBaselineLayout, widthAnchor, willMoveToSuperview, willMoveToWindow, willRemoveSubview, window
becomeFirstResponder, isFirstResponder, resignFirstResponder, touchesBegan, touchesCancelled, touchesEnded, touchesMoved
addObserver, observeValueForKeyPath, performSelector, performSelectorOnMainThread, release, removeObserver, removeObserver, retain, setValueForKey, setValueForUndefinedKey, valueForKey, valueForUndefinedKey
public MKAnnotationView(MKAnnotation annotation, String reuseIdentifier)
annotation
- The MKAnnotation object of the view.reuseIdentifier
- An id of this view in order to reuse it in the
future.public void prepareForReuse()
public boolean isEnabled()
public void setEnabled(boolean enabled)
enabled
- A Boolean that defines whether the annotation is enabled.public MKAnnotation annotation()
public void setAnnotation(MKAnnotation annotation)
annotation
- The annotation object of this viewpublic CGPoint calloutOffset()
public void setCalloutOffset(CGPoint calloutOffset)
calloutOffset
- The offset of the default map accessory view
expressed in points.public CGPoint centerOffset()
public void setCenterOffset(CGPoint centerOffset)
centerOffset
- The offset of the annotation view expressed in
points.public boolean isHighlighted()
public void setHighlighted(boolean highlighted)
highlighted
- A Boolean that defines whether the annotation view is
highlighted.public UIImage image()
public void setImage(UIImage image)
image
- The image of the annotation view.public String reuseIdentifier()
public boolean isSelected()
public void setSelected(boolean selected)
selected
- The selection state of the annotation view.public void setSelected(boolean selected, boolean animated)
selected
- The selection state of the annotation view.animated
- TRUE the change is done using animation.public boolean canShowCallout()
public void setCanShowCallout(boolean canShowCallout)
canShowCallout
- TRUE then the default map accessory view can
display additional information on the default accessory view.public UIView leftCalloutAccessoryView()
public void setLeftCalloutAccessoryView(UIView leftCalloutAccessoryView)
leftCalloutAccessoryView
- The view to be displayed on the left side
of the default map accessory view.public UIView rightCalloutAccessoryView()
public void setRightCalloutAccessoryView(UIView rightCalloutAccessoryView)
rightCalloutAccessoryView
- The view to be displayed on the right
side of the default map accessory view.public int dragState()
MKAnnotationViewDragState
public void setDragState(int MKAnnotationViewDragState)
MKAnnotationViewDragState
- The current drag state of the
annotation.public void setDragState(int MKAnnotationViewDragState, boolean animated)
MKAnnotationViewDragState
- The new current drag state of the
annotation.animated
- TRUE the change is animated.MKAnnotationViewDragState
public boolean isDraggable()
public void setDraggable(boolean draggable)
draggable
- TRUE the annotation is draggable.Copyright © 2020. All rights reserved.