|
ArcGIS Runtime SDK for iOS
100.15
|
Manages attachments belonging to a popup.
Instances of this class represent a light-weight and coarse-grained object for managing attachments of a popup.
It is useful for dealing with attachments (AGSPopupAttachment) if you want to create your own View Controller for displaying popups and attachments. It is used by AGSPopupManager and available for you to use through AGSPopupManager::attachmentManager.
Instance Methods | |
| (nullable AGSPopupAttachment *) | - addAttachmentAsJPGWithImage:name:preferredSize: |
| (AGSPopupAttachment *) | - addAttachmentWithData:name:contentType:preferredSize: |
| (void) | - addAttachmentWithItemProvider:name:preferredSize:completion: |
| (void) | - addAttachmentWithUIImagePickerControllerInfoDictionary:name:preferredSize:completion: |
| (NSArray< AGSPopupAttachment * > *) | - attachments |
| (NSString *) | - basenameForNewAttachmentWithType: |
| (void) | - deleteAttachment: |
| (id< AGSCancelable >) | - fetchAttachmentsWithCompletion: |
| (NSArray< AGSPopupAttachment * > *) | - filteredAndSortedAttachments |
| (instancetype) | - initWithFeature: |
| - (nullable AGSPopupAttachment*) addAttachmentAsJPGWithImage: | (AGSImage *) | image | |
| name: | (NSString *) | name | |
| preferredSize: | (AGSPopupAttachmentSize) | preferredSize | |
Add the specified image as an attachment.
finishEditingWithCompletion: (AGSPopupManager). However, the attachment will be available in attachments | image | The image to be added as an attachment. |
| name | The name of the attachment. If uploading to ArcGIS Enterprise, the name must include the file extension. |
nil if the image has no data. | - (AGSPopupAttachment*) addAttachmentWithData: | (NSData *) | data | |
| name: | (NSString *) | name | |
| contentType: | (NSString *) | contentType | |
| preferredSize: | (AGSPopupAttachmentSize) | preferredSize | |
Add the specified data as an attachment.
finishEditingWithCompletion: (AGSPopupManager). However, the attachment will be available in attachments | data | The data to be added as an attachment. |
| name | The name of the attachment. If uploading to ArcGIS Enterprise, the name must include the file extension. |
| contentType | The MIME type of the data. |
| - (void) addAttachmentWithItemProvider: | (NSItemProvider *) | itemProvider | |
| name: | (NSString *) | baseName | |
| preferredSize: | (AGSPopupAttachmentSize) | preferredSize | |
| completion: | (void(^)(AGSPopupAttachment *_Nullable attachment, NSError *_Nullable error)) | completion | |
Adds an NSItemProvider object as an attachment. Images and videos are supported.
| itemProvider | An NSItemProvider object provided by PHPickerResult.itemProvider. |
| baseName | The name of the attachment without the file extension. |
| preferredSize | The preferred size of the attachment. |
| completion | A block that is invoked when the operation completes. The completion handler will always be called with a nil and non-nil parameter. |
| - (void) addAttachmentWithUIImagePickerControllerInfoDictionary: | (NSDictionary *) | info | |
| name: | (NSString *) | baseName | |
| preferredSize: | (AGSPopupAttachmentSize) | preferredSize | |
| completion: | (void(^)(AGSPopupAttachment *attachment)) | completion | |
Add the specified image as an attachment.
finishEditingWithCompletion: (AGSPopupManager). However, the attachment will be available in attachments. | info | A dictionary provided by UIImagePickerController. |
| baseName | The name of the attachment without the file extension. |
| completion | A block that is invoked when the operation completes. |
| - (NSArray<AGSPopupAttachment*>*) attachments |
Returns all the current attachments. Will be empty if attachments haven't yet been fetched.
- fetchAttachmentsWithCompletion: to fetch - attachments | - (NSString*) basenameForNewAttachmentWithType: | (AGSPopupAttachmentType) | type |
Returns the base-name for a new attachment if you need to display a recommended name for an attachment before it's added.
| - (void) deleteAttachment: | (AGSPopupAttachment *) | attachment |
Delete the specified attachment.
finishEditingWithCompletion: (AGSPopupManager). However, the attachment will no longer be available in attachments | attachment | to delete |
| - (id<AGSCancelable>) fetchAttachmentsWithCompletion: | (nullable void(^)(NSArray< AGSPopupAttachment * > *__nullable attachments, NSError *__nullable error)) | completion |
Fetch the attachments that belong to the popup. Once complete then you can access the attachments.
| completion | block that is invoked when the operation completes. |
| - (NSArray<AGSPopupAttachment*>*) filteredAndSortedAttachments |
Returns the attachments filtered for types that AGSPopupsViewController can display (see AGSPopupAttachmentType) and sorted alphabetically by name. Will be empty if attachments haven't yet been fetched.
- fetchAttachmentsWithCompletion: to fetch - attachments | - (instancetype) initWithFeature: | (AGSArcGISFeature *) | feature |