Authored by Denis Zamataev

Applied patch that Implements setting calloutContentView in RMMapLayer in order …

…to set use it in callout view as it offers.
@@ -99,6 +99,13 @@ @@ -99,6 +99,13 @@
99 * 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. */ 99 * 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. */
100 @property (nonatomic, strong) UIView *rightCalloutAccessoryView; 100 @property (nonatomic, strong) UIView *rightCalloutAccessoryView;
101 101
  102 +/**
  103 + * Custom "content" view that can be any width/height.
  104 + *
  105 + * If this is set, title/subtitle/titleView/subtitleView are all ignored.
  106 + */
  107 +@property (nonatomic, strong) UIView *calloutContentView;
  108 +
102 /** Set the screen position of the layer. 109 /** Set the screen position of the layer.
103 * @param position The desired screen position. 110 * @param position The desired screen position.
104 * @param animated If set to `YES`, any position change is animated. */ 111 * @param animated If set to `YES`, any position change is animated. */
@@ -1950,6 +1950,13 @@ @@ -1950,6 +1950,13 @@
1950 _currentCallout.rightAccessoryView = anAnnotation.layer.rightCalloutAccessoryView; 1950 _currentCallout.rightAccessoryView = anAnnotation.layer.rightCalloutAccessoryView;
1951 } 1951 }
1952 1952
  1953 + if (anAnnotation.layer.calloutContentView) {
  1954 + if ([anAnnotation.layer.calloutContentView isKindOfClass:[UIControl class]])
  1955 + [anAnnotation.layer.calloutContentView addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapOnCalloutAccessoryWithGestureRecognizer:)]];
  1956 +
  1957 + _currentCallout.contentView = anAnnotation.layer.calloutContentView;
  1958 + }
  1959 +
1953 _currentCallout.delegate = self; 1960 _currentCallout.delegate = self;
1954 1961
1955 _currentCallout.permittedArrowDirection = SMCalloutArrowDirectionDown; 1962 _currentCallout.permittedArrowDirection = SMCalloutArrowDirectionDown;