ArcGIS Runtime SDK for iOS: AGSCallout.h Source File
ArcGIS Runtime SDK for iOS  100.15
AGSCallout.h
Go to the documentation of this file.
1 /*
2  COPYRIGHT 2022 ESRI
3 
4  All rights reserved under the copyright laws of the United States
5  and applicable international laws, treaties, and conventions.
6 
7  This material is licensed for use under the Esri Master License
8  Agreement (MLA), and is bound by the terms of that agreement.
9  You may redistribute and use this code without modification,
10  provided you adhere to the terms of the MLA and include this
11  copyright notice.
12 
13  See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english
14 
15  For additional information, contact:
16  Environmental Systems Research Institute, Inc.
17  Attn: Contracts and Legal Services Department
18  380 New York Street
19  Redlands, California, 92373
20  USA
21 
22  email: contracts@esri.com
23  */
24 
25 #import <Foundation/Foundation.h>
26 #import <ArcGIS/AGSView.h>
27 #import <ArcGIS/AGSImage.h>
28 #import <ArcGIS/AGSColor.h>
29 #import <UIKit/UIButton.h>
30 
31 @protocol AGSCalloutDelegate;
32 @class AGSPoint;
33 @class AGSLocationDisplay;
34 @class AGSFeature;
35 @class AGSGraphic;
36 
37 
38 
43 typedef NS_OPTIONS(NSUInteger, AGSCalloutLeaderPosition) {
49 };
50  //Required for Globals API doc
52 
68 @interface AGSCallout : AGSView
69 
70 #pragma mark -
71 #pragma mark initializers
72 
73 #pragma mark -
74 #pragma mark properties
75 
79 @property (nonatomic) CGFloat width;
80 
87 @property (nullable, nonatomic, strong) AGSView *customView;
88 
89 
93 @property (nonatomic) UIButtonType accessoryButtonType;
94 
98 @property (nullable, nonatomic, strong) UIImage *accessoryButtonImage;
99 
100 
105 @property (nullable, nonatomic, strong) AGSImage *image;
106 
111 @property (nonatomic) BOOL autoAdjustWidth;
112 
117 @property (nonatomic, assign, getter=isAccessoryButtonHidden) BOOL accessoryButtonHidden;
118 
137 @property (nonatomic, assign) AGSCalloutLeaderPosition leaderPositionFlags;
138 
142 @property (nullable, nonatomic, strong) AGSColor *borderColor;
143 
147 @property (nonatomic, assign) CGFloat borderWidth;
148 
155 @property (nullable, nonatomic, strong, readonly) AGSPoint *mapLocation;
156 
164 @property (nonatomic, readonly) CGPoint screenOffset;
165 
169 @property (nullable, nonatomic, copy) NSString *title;
170 
174 @property (nullable, nonatomic, copy) NSString *detail;
175 
179 @property (nonatomic, strong) AGSColor *color;
180 
184 @property (nullable, nonatomic, strong) AGSColor *highlight;
185 
189 @property (nonatomic, strong) AGSColor *titleColor;
190 
194 @property (nonatomic, strong) AGSColor *detailColor;
195 
199 @property (nullable, nonatomic, weak) id<AGSCalloutDelegate> delegate;
200 
204 @property (nonatomic) CGSize margin;
205 
210 @property (nonatomic) CGFloat cornerRadius;
211 
217 @property (nonatomic) CGFloat maxWidth;
218 
222 @property (nullable, nonatomic, strong, readonly) id representedObject;
223 
224 #pragma mark -
225 #pragma mark methods
226 
236 -(BOOL)showCalloutForFeature:(AGSFeature*)feature tapLocation:(nullable AGSPoint*)mapTapLocation animated:(BOOL)animated;
237 
247 -(BOOL)showCalloutForGraphic:(AGSGraphic*)graphic tapLocation:(nullable AGSPoint*)mapTapLocation animated:(BOOL)animated;
248 
256 
264 -(void)showCalloutAt:(AGSPoint*)mapLocation screenOffset:(CGPoint)screenOffset rotateOffsetWithMap:(BOOL)rotateOffsetWithMap animated:(BOOL)animated;
265 
269 -(void)dismiss;
270 
271 @end
272 
273 
274 
275 #pragma mark -
276 
288 
289 @optional
290 
297 -(BOOL)callout:(AGSCallout*)callout willShowAtMapPoint:(AGSPoint *)mapPoint;
298 
305 -(BOOL)callout:(AGSCallout*)callout willShowForLocationDisplay:(AGSLocationDisplay*)locationDisplay;
306 
310 -(void)calloutWillDismiss:(AGSCallout*)callout;
311 
315 -(void)calloutDidDismiss:(AGSCallout*)callout;
316 
322 - (void)didTapAccessoryButtonForCallout:(AGSCallout *)callout;
323 
324 @end
325 
326 
AGSCalloutLeaderPosition
Definition: AGSCallout.h:43
@ AGSCalloutLeaderPositionAny
Definition: AGSCallout.h:48
@ AGSCalloutLeaderPositionLeft
Definition: AGSCallout.h:46
@ AGSCalloutLeaderPositionTop
Definition: AGSCallout.h:45
@ AGSCalloutLeaderPositionBottom
Definition: AGSCallout.h:44
@ AGSCalloutLeaderPositionRight
Definition: AGSCallout.h:47
#define AGSColor
Definition: AGSColor.h:34
#define AGSImage
Definition: AGSImage.h:34
#define AGSView
Definition: AGSView.h:32
A callout window.
Definition: AGSCallout.h:69
CGFloat maxWidth
Definition: AGSCallout.h:217
NSString * detail
Definition: AGSCallout.h:174
AGSColor * borderColor
Definition: AGSCallout.h:142
AGSView * customView
Definition: AGSCallout.h:87
id representedObject
Definition: AGSCallout.h:222
CGPoint screenOffset
Definition: AGSCallout.h:164
AGSColor * highlight
Definition: AGSCallout.h:184
AGSImage * image
Definition: AGSCallout.h:105
UIButtonType accessoryButtonType
Definition: AGSCallout.h:93
AGSPoint * mapLocation
Definition: AGSCallout.h:155
BOOL showCalloutForLocationDisplay()
id< AGSCalloutDelegate > delegate
Definition: AGSCallout.h:199
AGSCalloutLeaderPosition leaderPositionFlags
Definition: AGSCallout.h:137
CGFloat width
Definition: AGSCallout.h:79
UIImage * accessoryButtonImage
Definition: AGSCallout.h:98
CGFloat borderWidth
Definition: AGSCallout.h:147
AGSColor * detailColor
Definition: AGSCallout.h:194
void dismiss()
BOOL autoAdjustWidth
Definition: AGSCallout.h:111
BOOL accessoryButtonHidden
Definition: AGSCallout.h:117
AGSColor * color
Definition: AGSCallout.h:179
CGFloat cornerRadius
Definition: AGSCallout.h:210
NSString * title
Definition: AGSCallout.h:169
AGSColor * titleColor
Definition: AGSCallout.h:189
CGSize margin
Definition: AGSCallout.h:204
A representation of a real-world object on a map.
Definition: AGSFeature.h:47
A graphic on top of a map.
Definition: AGSGraphic.h:58
Displays device location on a map.
Definition: AGSLocationDisplay.h:65
A location defined by x and y (and optionally z) coordinates.
Definition: AGSPoint.h:73
A delegate of AGSCallout.
Definition: AGSCallout.h:287