Adding custom functions to Feature Edit Popup

1911
4
Jump to solution
08-12-2012 10:46 PM
EikeLüders
New Contributor II
Hi everybody,

currently I develop using the iOS SDK for ArcGIS.
Now I want to add a some custom actions to my PopupInfo when I edit a Feature.

E.g.: I have a Point Feature with some attributes. One attribute should represent the size of a polygon (as double).
The user should have the ability to insert the size manually (no problem here) and should have the ability to
draw a polygon on the map to get the size calculated automatically.

Ok, the question is: How can I add a custom button for an attribute in the PopupInfo of a feature to add my custom action, or is this even possible?

Best regards,
Eike
0 Kudos
1 Solution

Accepted Solutions
EikeLüders
New Contributor II
Nobody?

Ok, I done it myself. Here's my solution if anyone is interested:

- I subclassed the AGSPopupsViewViewController
- Added a custom edit Button
- Implemented my own UIActionsheet that shows when the edit Button is tapped
- Added my custom function as button to the ActionSheet
- Added the default actions (Edit, Delete, Cancel) to the ActionSheet
- Done

View solution in original post

0 Kudos
4 Replies
EikeLüders
New Contributor II
Nobody?

Ok, I done it myself. Here's my solution if anyone is interested:

- I subclassed the AGSPopupsViewViewController
- Added a custom edit Button
- Implemented my own UIActionsheet that shows when the edit Button is tapped
- Added my custom function as button to the ActionSheet
- Added the default actions (Edit, Delete, Cancel) to the ActionSheet
- Done
0 Kudos
NimeshJarecha
Esri Regular Contributor
You don't need to subclass. You should set your own button/action to the AGSPopupsContainerViewController's actionButton. Please see custom action documentation.

Hope this helps!

Regards,
Nimesh
0 Kudos
EikeLüders
New Contributor II
Yes, you're right.

But then I have to implement the ActionSheet delegate methods in my other ViewController though it belongs to the PopupViewController (if I want to display an ActionSheet when I tap the Edit button).
I think it's more clear when the delegate methods are found in the class they actually belong to, but that's may be a matter of personal coding style.

Best regards
Eike
0 Kudos
ozcandurak
New Contributor III

Hi, Can you please share how you have subclassed the AGSPopupsViewViewController, I m trying to achieve same thing, but no success yet

0 Kudos