AGSPopupsContanerViewController Attachment Editor

5314
13
05-02-2016 02:14 PM
VIKRANTKRISHNA
New Contributor III

Is there a way to bypass the attribute editing workflow and directly go to Attachment Editing section of AGSPopupsContainerViewController. Basically when user taps the feature on the map, it directly open up popup in attachment editing mode and close from there. Is there a easy implementation with existing AGSPopupsContainerViewController, or the only way possible to write custom View Controller for this?

13 Replies
ozcandurak
New Contributor III

Hi Vikrant, I have mailed you. Thanks for getting back.

0 Kudos
SuganyaBaskaran1
Esri Contributor

You can reduce number of steps in Quartz as attributes and attachments are presented in the same vc. So by following a similar approach Divesh suggests, you may have the following steps

1. Click Edit

2. Popup VC opens in editing mode with just attachments (assuming visibility of fields in popupDefinition.fields is set to false).

3. Hit Done to close popup.

In my app some layers require attribute editing, but for some layers, inspectors just want to take picture attachments (because attribute editing for these layers is handled with different custom view controller).

It seems like you already have a different workflow for certain layers - you may use that check to toggle the visibility of the fields.

Quartz screenshots:

Screen Shot 2016-05-13 at 10.11.57 AM.pngScreen Shot 2016-05-13 at 10.00.24 AM.png

0 Kudos
ozcandurak
New Contributor III

Hi Suganya Baskaran​, Can you please share your code how you have achieved it,

Couldn't find any sample related to it. I m using offline editing sample.

Regards.

0 Kudos
SuganyaBaskaran1
Esri Contributor

I was using Edit Features (Connected)​ sample. Note that this is Quartz-beta branch and requires Quartz-Beta2 version of the SDK.

for field in popup.popupDefinition.popupFields {

field.visible = false

}

You may try the same with Offline Editing sample 10.2.5 using popupInfo.fieldInfos, but the behavior would be slightly different.