ArcGIS Runtime SDK for iOS: AGSPopupsViewController.h Source File
ArcGIS Runtime SDK for iOS  100.15
AGSPopupsViewController.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  //Required for Globals API doc
26 
27 #import <Foundation/Foundation.h>
28 #import <UIKit/UIKit.h>
29 #import <ArcGIS/AGSPopupAttachment.h>
30 
31 
32 
33 @class AGSPopupViewController;
34 @class AGSGeometry;
35 @class AGSGeometryBuilder;
36 @class AGSPopup;
39 @class AGSSketchEditor;
40 
45 typedef NS_ENUM(NSInteger, AGSPopupsViewControllerContainerStyle) {
49 };
50 
55 typedef NS_ENUM(NSInteger, AGSPopupsViewControllerGeometryEditingStyle) {
58 };
59 
64 typedef NS_ENUM(NSInteger, AGSPopupViewControllerType) {
72 };
73 
82 
83 @optional
84 
90 - (nullable AGSSketchEditor *)popupsViewController:(AGSPopupsViewController *)popupsViewController sketchEditorForPopup:(AGSPopup *)popup;
91 
104 - (void)popupsViewController:(AGSPopupsViewController *)popupsViewController readyToEditGeometryWithSketchEditor:(nullable AGSSketchEditor *)sketchEditor forPopup:(AGSPopup *)popup;
105 
111 - (void)popupsViewController:(AGSPopupsViewController *)popupsViewController didStartEditingForPopup:(AGSPopup *)popup;
112 
120 - (void)popupsViewController:(AGSPopupsViewController *)popupsViewController willFinishEditingForPopup:(AGSPopup *)popup;
121 
128 - (void)popupsViewController:(AGSPopupsViewController *)popupsViewController didFinishEditingForPopup:(AGSPopup *)popup;
129 
138 - (void)popupsViewController:(AGSPopupsViewController *)popupsViewController didFailToFinishEditingForPopup:(AGSPopup *)popup withError:(NSError *)error;
139 
145 - (void)popupsViewController:(AGSPopupsViewController *)popupsViewController didCancelEditingForPopup:(AGSPopup *)popup;
146 
156 - (BOOL)popupsViewController:(AGSPopupsViewController *)popupsViewController wantsToDeleteForPopup:(AGSPopup *)popup;
157 
163 - (void)popupsViewController:(AGSPopupsViewController *)popupsViewController didDeleteForPopup:(AGSPopup *)popup;
164 
173 - (void)popupsViewController:(AGSPopupsViewController *)popupsViewController didFailToDeleteForPopup:(AGSPopup *)popup withError:(NSError *)error;
174 
179 - (void)popupsViewControllerDidFinishViewingPopups:(AGSPopupsViewController *)popupsViewController;
180 
190 - (void)popupsViewController:(AGSPopupsViewController *)popupsViewController validityChanged:(BOOL)isValid forPopup:(AGSPopup *)popup;
191 
202 - (void)popupsViewController:(AGSPopupsViewController *)popupsViewController wantsToShowViewController:(UIViewController *)svc ofType:(AGSPopupViewControllerType)viewType fromViewController:(UIViewController *)fvc atRect:(CGRect)rect;
203 
212 - (void)popupsViewController:(AGSPopupsViewController *)popupsViewController wantsToHideViewController:(UIViewController *)vc ofType:(AGSPopupViewControllerType)viewType;
213 
222 - (BOOL)popupsViewController:(AGSPopupsViewController *)popupsViewController shouldAutorotateForViewController:(UIViewController *)vc ofType:(AGSPopupViewControllerType)viewType;
223 
229 - (nullable UIView *)popupsViewController:(AGSPopupsViewController *)popupsViewController headerViewForPopup:(AGSPopup *)popup;
230 
236 - (nullable UIView *)popupsViewController:(AGSPopupsViewController *)popupsViewController footerViewForPopup:(AGSPopup *)popup;
237 
243 - (void)popupsViewController:(AGSPopupsViewController *)popupsViewController didChangeToCurrentPopup:(AGSPopup *)popup;
244 
255 - (void)popupsViewController:(AGSPopupsViewController *)popupsViewController wantsToPreviewDocumentAtURL:(NSURL *)documentURL fromViewController:(UIViewController *)fvc atRect:(CGRect)rect;
256 
263 - (void)popupsViewController:(AGSPopupsViewController *)popupsViewController didChangeFeatureTypeForPopup:(AGSPopup *)popup;
264 
265 @end
266 
281 @interface AGSPopupsViewController : UIViewController
282 
283 #pragma mark -
284 #pragma mark initializers
285 
290 -(instancetype)initWithPopups:(nullable NSArray<AGSPopup*>*)popups;
291 
292 
297 +(instancetype)popupsViewControllerWithPopups:(nullable NSArray<AGSPopup*>*)popups;
298 
299 #pragma mark -
300 #pragma mark properties
301 
307 @property (nonatomic, weak, nullable) id<AGSPopupsViewControllerDelegate> delegate;
308 
313 @property (nonatomic, copy, nullable) NSArray<AGSPopup*> *popups;
314 
318 @property (nonatomic, assign, readonly) BOOL inEditingMode;
319 
325 @property (nonatomic, strong, readonly) AGSSketchEditor *currentSketchEditor;
326 
330 @property (nonatomic, strong, readonly, nullable) AGSPopup *currentPopup;
331 
335 @property (nonatomic, strong, readwrite) AGSPopupsViewControllerTheme *theme;
336 
340 @property (nonatomic, assign, readwrite) AGSPopupAttachmentSize defaultAttachmentSize;
341 
342 #pragma mark -
343 #pragma mark methods
344 
353 -(void)showAdditionalPopups:(NSArray<AGSPopup*> *)popups;
354 
359 
364 -(void)finishEditingCurrentPopupWithCompletion:(nullable void(^)(NSError *__nullable error))completion;
365 
370 
377 -(void)clearAllPopups;
378 
384 -(instancetype)initWithPopups:(nullable NSArray<AGSPopup*> *)popups containerStyle:(AGSPopupsViewControllerContainerStyle)containerStyle;
385 
391 +(instancetype)popupsViewControllerWithPopups:(nullable NSArray<AGSPopup*> *)popups containerStyle:(AGSPopupsViewControllerContainerStyle)containerStyle;
392 
397 @property (nonatomic, strong, readonly, nullable) UIBarButtonItem *doneButton;
398 
404 @property (nonatomic, strong, readwrite, nullable) UIBarButtonItem *customDoneButton;
405 
410 @property (nonatomic, strong, readonly, nullable) UIBarButtonItem *actionButton;
411 
417 @property (nonatomic, strong, readwrite, nullable) UIBarButtonItem *customActionButton;
418 
423 
429 @property (nonatomic, strong, nullable) UIViewController *modalPresenter;
430 
431 @end
432 
433 
AGSPopupAttachmentSize
Definition: AGSPopupAttachment.h:68
AGSPopupsViewControllerGeometryEditingStyle
Definition: AGSPopupsViewController.h:55
@ AGSPopupsViewControllerGeometryEditingStyleInline
Definition: AGSPopupsViewController.h:57
@ AGSPopupsViewControllerGeometryEditingStyleToolbar
Definition: AGSPopupsViewController.h:56
AGSPopupsViewControllerContainerStyle
Definition: AGSPopupsViewController.h:45
@ AGSPopupsViewControllerContainerStyleCustom
Definition: AGSPopupsViewController.h:48
@ AGSPopupsViewControllerContainerStyleNavigationController
Definition: AGSPopupsViewController.h:46
@ AGSPopupsViewControllerContainerStyleNavigationBar
Definition: AGSPopupsViewController.h:47
AGSPopupViewControllerType
Definition: AGSPopupsViewController.h:64
@ AGSPopupViewControllerTypeFullMedia
Definition: AGSPopupsViewController.h:67
@ AGSPopupViewControllerTypeAlert
Definition: AGSPopupsViewController.h:71
@ AGSPopupViewControllerTypeAttributeInput
Definition: AGSPopupsViewController.h:70
@ AGSPopupViewControllerTypeContainer
Definition: AGSPopupsViewController.h:65
@ AGSPopupViewControllerTypeMovie
Definition: AGSPopupsViewController.h:69
@ AGSPopupViewControllerTypeWeb
Definition: AGSPopupsViewController.h:68
@ AGSPopupViewControllerTypeUIImagePicker
Definition: AGSPopupsViewController.h:66
A builder to build geometries.
Definition: AGSGeometryBuilder.h:43
Base class for all classes that represent geometric shapes.
Definition: AGSGeometry.h:121
A popup which displays a geo-element's information.
Definition: AGSPopup.h:44
A view controller for displaying popups.
Definition: AGSPopupsViewController.h:282
UIBarButtonItem * doneButton
Definition: AGSPopupsViewController.h:397
AGSSketchEditor * currentSketchEditor
Definition: AGSPopupsViewController.h:325
AGSPopupAttachmentSize defaultAttachmentSize
Definition: AGSPopupsViewController.h:340
UIViewController * modalPresenter
Definition: AGSPopupsViewController.h:429
NSArray< AGSPopup * > * popups
Definition: AGSPopupsViewController.h:313
id< AGSPopupsViewControllerDelegate > delegate
Definition: AGSPopupsViewController.h:307
UIBarButtonItem * customDoneButton
Definition: AGSPopupsViewController.h:404
AGSPopupsViewControllerTheme * theme
Definition: AGSPopupsViewController.h:335
BOOL inEditingMode
Definition: AGSPopupsViewController.h:318
UIBarButtonItem * actionButton
Definition: AGSPopupsViewController.h:410
AGSPopupsViewControllerGeometryEditingStyle geometryEditingStyle
Definition: AGSPopupsViewController.h:422
AGSPopup * currentPopup
Definition: AGSPopupsViewController.h:330
UIBarButtonItem * customActionButton
Definition: AGSPopupsViewController.h:417
A theme to configure the appearance of AGSPopupsViewController.
Definition: AGSPopupsViewControllerTheme.h:41
A class that allows the user to sketch geometries on the map.
Definition: AGSSketchEditor.h:75
A delegate of AGSPopupsViewController.
Definition: AGSPopupsViewController.h:81