|
ArcGIS Runtime SDK for iOS
100.9
|
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: |
| (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. |
| - (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 |