ArcGIS Runtime SDK for iOS: AGSPopupAttachmentManager.h Source File
ArcGIS Runtime SDK for iOS  100.11
AGSPopupAttachmentManager.h
Go to the documentation of this file.
1 /*
2  COPYRIGHT 2021 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 <ArcGIS/AGSImage.h>
29 #import <ArcGIS/AGSPopupAttachment.h>
30 #import <PhotosUI/PhotosUI.h>
31 
32 
33 
34 @class AGSArcGISFeature;
35 
36 @protocol AGSCancelable;
37 
46 @interface AGSPopupAttachmentManager : NSObject
47 
48 #pragma mark -
49 #pragma mark initializers
50 
51 -(instancetype)initWithFeature:(AGSArcGISFeature*)feature;
52 
53 #pragma mark -
54 #pragma mark properties
55 
56 #pragma mark -
57 #pragma mark methods
58 
64 -(id<AGSCancelable>)fetchAttachmentsWithCompletion:(nullable void(^)(NSArray<AGSPopupAttachment*>* __nullable attachments, NSError* __nullable error))completion;
65 
71 -(NSArray<AGSPopupAttachment*>*)attachments;
72 
79 
85 -(void)deleteAttachment:(AGSPopupAttachment*)attachment;
86 
95 -(nullable AGSPopupAttachment*)addAttachmentAsJPGWithImage:(AGSImage*)image name:(NSString*)name preferredSize:(AGSPopupAttachmentSize)preferredSize;
96 
106 -(AGSPopupAttachment*)addAttachmentWithData:(NSData*)data name:(NSString*)name contentType:(NSString*)contentType preferredSize:(AGSPopupAttachmentSize)preferredSize;
107 
115 -(void)addAttachmentWithUIImagePickerControllerInfoDictionary:(NSDictionary *)info
116  name:(NSString *)baseName
117  preferredSize:(AGSPopupAttachmentSize)preferredSize
118  completion:(void (^)(AGSPopupAttachment *attachment))completion;
119 
126 - (void)addAttachmentWithItemProvider:(NSItemProvider *)itemProvider
127  name:(NSString *)baseName
128  preferredSize:(AGSPopupAttachmentSize)preferredSize
129  completion:(void (^)(AGSPopupAttachment * _Nullable attachment, NSError * _Nullable error))completion API_AVAILABLE(ios(14));
130 
134 -(NSString*)basenameForNewAttachmentWithType:(AGSPopupAttachmentType)type;
135 
136 @end
137 
138 
#define AGSImage
Definition: AGSImage.h:34
AGSPopupAttachmentType
Definition: AGSPopupAttachment.h:57
AGSPopupAttachmentSize
Definition: AGSPopupAttachment.h:68
An AGSFeature object stored in an AGSArcGISFeatureTable object.
Definition: AGSArcGISFeature.h:62
An attachment belonging to a popup.
Definition: AGSPopupAttachment.h:99
Manages attachments belonging to a popup.
Definition: AGSPopupAttachmentManager.h:47
NSArray< AGSPopupAttachment * > * filteredAndSortedAttachments()
NSArray< AGSPopupAttachment * > * attachments()
A protocol exposed by operations that allow cancellation.
Definition: AGSCancelable.h:38