This refactors the Existing popup attachment views so they can be used by both Popups and Feature Forms. Functionality includes:
View all attachments in a feature
Display default icon appropriate for attachment types (unloaded attachments)
Ability to load attachments by tapping on them
Display custom attachment thumbnails (loaded attachments; certain types only - images, movies, PDFs)
Display editing controls for adding/deleting/renaming attachments (editing functionality is still a work-in-progress)
Ability to view attachments full-screen using native file viewer
Code changes include:
Add FeatureAttachment protocol, inherited by both PopupAttachment and FormAttachment
Add AttachmentsFeatureElement protocol, inherited by both AttachmentsPopupElement and AttachmentFormElement
Refactor existing popup element/attachment views to use the new FeatureAttachment and AttachmentsFeatureElement protocols, allowing both popups and Forms to use them.
Renamed existing file AttachmentsPopupElementView to AttachmentsFeatureElementView
Moved common UI/model files to new "Common" folder under "ArcGISToolkit"
Add context menu for "Rename" and "Delete" of attachments (Form editing-only)
Add "Add" button for adding new attachments (Form editing-only)
Added a shouldEnableEditControls view modifier to AttachmentsFeatureElementView in order to enable/display editing controls.
In most cases, I reordered the #imports.
Removed if !targetEnvironment(macCatalyst) checks for QuickLook stuff as it now appears that is supported on macOS.
This refactors the Existing popup attachment views so they can be used by both Popups and Feature Forms. Functionality includes:
Code changes include:
FeatureAttachment
protocol, inherited by bothPopupAttachment
andFormAttachment
AttachmentsFeatureElement
protocol, inherited by bothAttachmentsPopupElement
andAttachmentFormElement
FeatureAttachment
andAttachmentsFeatureElement
protocols, allowing both popups and Forms to use them.AttachmentsPopupElementView
toAttachmentsFeatureElementView
shouldEnableEditControls
view modifier toAttachmentsFeatureElementView
in order to enable/display editing controls.#import
s.if !targetEnvironment(macCatalyst)
checks for QuickLook stuff as it now appears that is supported on macOS.