10.2.5: <AGSPopupsContainerDelegate> Protocol Reference
10.2.5
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
<AGSPopupsContainerDelegate> Protocol Reference

Description

A protocol that must be adopted by any class wishing to be notified when AGSPopupsContainerViewController detects user interaction with popups or if a user tries to edit a popup. An instance of the class must then be set as AGSPopupsContainerViewController::delegate .

All methods of this protocol are optional.

Since
2.0
Inheritance diagram for <AGSPopupsContainerDelegate>:

Instance Methods

(void) - popupsContainer:didCancelEditingForPopup:
 
(void) - popupsContainer:didCancelEditingGraphicForPopup:
 
(void) - popupsContainer:didChangeFeatureTypeForPopup:
 
(void) - popupsContainer:didChangeToCurrentPopup:
 
(void) - popupsContainer:didDeleteForPopup:
 
(void) - popupsContainer:didFailToDeleteForPopup:withError:
 
(void) - popupsContainer:didFailToFinishEditingForPopup:withError:
 
(void) - popupsContainer:didFinishEditingForPopup:
 
(void) - popupsContainer:didFinishEditingGraphicForPopup:
 
(void) - popupsContainer:didStartEditingForPopup:
 
(void) - popupsContainer:didStartEditingGraphicForPopup:
 
(void) - popupsContainer:readyToEditGeometry:forPopup:
 
(void) - popupsContainer:readyToEditGraphicGeometry:forPopup:
 
(BOOL) - popupsContainer:shouldAutorotateToInterfaceOrientation:forViewController:ofType:
 
(void) - popupsContainer:validityForPopupChanged:
 
(AGSGeometry *) - popupsContainer:wantsNewMutableGeometryForPopup:
 
(void) - popupsContainer:wantsToDeleteForPopup:
 
(void) - popupsContainer:wantsToDeleteGraphicForPopup:
 
(void) - popupsContainer:wantsToHideViewController:ofType:
 
(void) - popupsContainer:wantsToPreviewDocumentAtURL:fromViewController:atRect:
 
(void) - popupsContainer:wantsToShowViewController:ofType:fromViewController:atRect:
 
(void) - popupsContainerDidFinishViewingPopups:
 

Method Documentation

- (void) popupsContainer: (id< AGSPopupsContainer >)  popupsContainer
didCancelEditingForPopup: (AGSPopup *)  popup 
optional

The method called by the AGSPopupsContainer when the user cancels editing the current popup.

Parameters
popupsContainerThe popup view controller
popupwhose feature was started to be edited but later cancelled
Since
10.2
- (void) popupsContainer: (id< AGSPopupsContainer >)  popupsContainer
didCancelEditingGraphicForPopup: (AGSPopup *)  popup 
optional

The method called by the AGSPopupsContainer when the user cancels editing the current popup.

Parameters
popupsContainerThe popup view controller
popupwhose graphic was started to be edited but later cancelled
Deprecated:
Deprecated at 10.2. Please use popupsContainer:didCancelEditingForPopup: instead.
Since
2.0
- (void) popupsContainer: (id< AGSPopupsContainer >)  popupsContainer
didChangeFeatureTypeForPopup: (AGSPopup *)  popup 
optional

The AGSPopupsContainer will call this when the user switches a feature type for the current popup. Potentially at this point symbology will change for the feature.

Since
10.1.1
- (void) popupsContainer: (id< AGSPopupsContainer >)  popupsContainer
didChangeToCurrentPopup: (AGSPopup *)  popup 
optional

The AGSPopupsContainer will call this method when the currently showing popup changes.

Parameters
popupsContainerThe popup view controller
popupwhich is currently being displayed
Since
2.0
- (void) popupsContainer: (id< AGSPopupsContainer >)  popupsContainer
didDeleteForPopup: (AGSPopup *)  popup 
optional

The method called by the AGSPopupsContainer when it successfully deletes an AGSGDBFeature in a local geodatabase.

Parameters
popupsContainerThe popup view controller
popupwhose feature was deleted
Since
10.2.2
- (void) popupsContainer: (id< AGSPopupsContainer >)  popupsContainer
didFailToDeleteForPopup: (AGSPopup *)  popup
withError: (NSError *)  error 
optional

The method called by the AGSPopupsContainer when it fails to delete an AGSGDBFeature in a local geodatabase. If you do not implement this method then AGSPopupsContainer will show an alert to the user with the error. If you do implement this method then you are responsible for bubbling up the error to the user.

Parameters
popupsContainerThe popup view controller
popupwhose feature was meant to be deleted
errorthat occurred
Since
10.2.2
- (void) popupsContainer: (id< AGSPopupsContainer >)  popupsContainer
didFailToFinishEditingForPopup: (AGSPopup *)  popup
withError: (NSError *)  error 
optional

The method called by the AGSPopupsContainer when the user tries to finish editing but errors were encountered. If you implement this method then you are responsible for showing any UI that should be shown when an editing error occurs. If you do not implement this method the AGSPopupsContainer will show an alert depicting the localized description of the error.

Parameters
popupsContainerThe popup view controller
popupwhose feature was edited
errorthat occurred when trying to finish editing
Since
10.2
- (void) popupsContainer: (id< AGSPopupsContainer >)  popupsContainer
didFinishEditingForPopup: (AGSPopup *)  popup 
optional

The method called by the AGSPopupsContainer when the user is done editing the current popup.

Note
If the popup is for an online feature (represented by AGSGraphic objects belonging to AGSFeatureLayer), the popupsContainer only applies edits to the feature in memory. You are responsible for applying the edit on the server or persisting it some other way to ensure it does not get lost when the application terminates. If the popup is for an offline feature (represented by AGSGDBFeature in a local geodatabase), the popupsContainer automatically persists edits to the geodatabase on the device. You only need to sync changes in the geodatabase with the server.
Parameters
popupsContainerThe popup view controller
popupwhose feature was edited
Since
10.2
- (void) popupsContainer: (id< AGSPopupsContainer >)  popupsContainer
didFinishEditingGraphicForPopup: (AGSPopup *)  popup 
optional

The method called by the AGSPopupsContainer when the user is done editing the current popup.

Parameters
popupsContainerThe popup view controller
popupwhose graphic was edited
Deprecated:
Deprecated at 10.2. Please use popupsContainer:didFinishEditingForPopup: instead.
Since
2.0
- (void) popupsContainer: (id< AGSPopupsContainer >)  popupsContainer
didStartEditingForPopup: (AGSPopup *)  popup 
optional

The method called by the AGSPopupsContainer when the user begins editing the current popup.

Parameters
popupsContainerThe popup view controller
popupwhose feature needs to be edited
Since
10.2
- (void) popupsContainer: (id< AGSPopupsContainer >)  popupsContainer
didStartEditingGraphicForPopup: ((deprecated))  __attribute 
optional

The method called by the AGSPopupsContainer when the user begins editing the current popup.

Parameters
popupsContainerThe popup view controller
popupwhose graphic needs to be edited
Deprecated:
Deprecated at 10.2. Please use popupsContainer:didStartEditingForPopup: instead.
Since
2.0
- (void) popupsContainer: (id< AGSPopupsContainer >)  popupsContainer
readyToEditGeometry: (AGSGeometry *)  geometry
forPopup: (AGSPopup *)  popup 
optional

Tells the delegate that a user is ready to edit the geometry for the current popup. This will happen when the user clicks the toolbar item for editing the geometry. Or if the editing mode is "Geometry Inline", it will happen when editing begins.

The geometry will be mutable. You need to update it based on the changes the user wants to make. For example, if you are using an AGSSketchGraphicsLayer to allow the user to interactively reshape the feature, this will be the same geometry that you give the AGSSketchGraphicsLayer. Another option is that you could update the geometry based on the GPS coordinates reported by AGSLocationDisplay.

Parameters
popupsContainerThe popup view controller
geometryThe mutable geometry that should be updated with the desired changes.
popupwhose feature's geometry needs to be edited
Since
10.2
- (void) popupsContainer: (id< AGSPopupsContainer >)  popupsContainer
readyToEditGraphicGeometry: (AGSGeometry *)  geometry
forPopup: (AGSPopup *)  popup 
optional

Tells the delegate that a user is ready to edit the geometry for the current popup. This will happen when the user clicks the toolbar item for editing the geometry. Or if the editing mode is "Geometry Inline", it will happen when editing begins.

Parameters
popupsContainerThe popup view controller
geometryIf you are using an AGSSketchGraphicsLayer, this will be the same geometry that you give the AGSSketchGraphicsLayer.
popupwhose graphic's geometry needs to be edited
Deprecated:
Deprecated at 10.2. Please use popupsContainer:readyToEditGeometry:forPopup: instead.
Since
2.0
- (BOOL) popupsContainer: (id< AGSPopupsContainer >)  popupsContainer
shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation)  interfaceOrientation
forViewController: (UIViewController *)  vc
ofType: (AGSPopupViewType viewType 
optional

The AGSPopupsContainer will call this delegate method when it one of it's view controllers needs to know if it can auto-rotate to an certain interface orientation. If you don't implement this method then we just always return YES.

Parameters
popupsContainerThe popup view controller
interfaceOrientationThe orientation to change to
vcThe view controller that needs to respond to orientation change
viewTypethe predefined type of the view controller
Since
2.0
- (void) popupsContainer: (id< AGSPopupsContainer >)  popupsContainer
validityForPopupChanged: (BOOL)  isValid 
optional

The method called by the AGSPopupsContainer when a popup's validity is changed. This happens when the geometry or attributes of the popup's feature are changed. isValid will be YES if it is determined that a feature meets it's requirements to be saved to it's datasource. This method is useful if you have your own "finish editing" button and you want to enable/disable it when the feature is valid.

Parameters
popupsContainerThe popup view controller
isValidWhether or not the feature meets it's known requirements to be saved to it's datasource.
Since
10.2.3
- (AGSGeometry*) popupsContainer: (id< AGSPopupsContainer >)  popupsContainer
wantsNewMutableGeometryForPopup: (AGSPopup *)  popup 
optional

Tells the delegate that a new mutable geometry is required for a graphic that currently has no geometry. Must return a mutable geometry.

Parameters
popupsContainerThe popup view controller
popupPopup for who's graphic we need a geometry for.
Since
2.0
- (void) popupsContainer: (id< AGSPopupsContainer >)  popupsContainer
wantsToDeleteForPopup: (AGSPopup *)  popup 
optional

The method called by the AGSPopupsContainer when the user confirms they want to delete the feature. The implementer of this method must actually delete the feature.

Note
This method will only be called for online features (represented by AGSGraphic objects belonging to AGSFeatureLayer) which the developer must delete themselves. It will NOT be called for features in a local geodatabase (represented by AGSGDBFeature objects). Local features will be automatically deleted by the SDK and then popupsContainer:didDeleteForPopup: will be called.
Parameters
popupsContainerThe popup view controller
popupwhose feature needs to be deleted
Since
10.2
- (void) popupsContainer: (id< AGSPopupsContainer >)  popupsContainer
wantsToDeleteGraphicForPopup: (AGSPopup *)  popup 
optional

The method called by the AGSPopupsContainer when the user presses the delete button. The implementer of this method must actually delete the graphic.

Parameters
popupsContainerThe popup view controller
popupwhose graphic needs to be deleted
Deprecated:
Deprecated at 10.2. Please use popupsContainer:wantsToDeleteForPopup: instead.
Since
2.0
- (void) popupsContainer: (id< AGSPopupsContainer >)  popupsContainer
wantsToHideViewController: (AGSViewController *)  vc
ofType: (AGSPopupViewType viewType 
optional

The AGSPopupsContainer will call this method on the delegate when a view controller needs to be hidden. You need to implement this if you implement popupsContainer:wantsToShowViewController:fromViewController:atRect, so that you can hide a view controller in the proper way if you've shown it in a custom manner.

Parameters
popupsContainerThe popup view controller
vcThe view controller that needs to be hidden
viewTypethe predefined type of the view controller
Since
2.0
- (void) popupsContainer: (id< AGSPopupsContainer >)  popupsContainer
wantsToPreviewDocumentAtURL: (NSURL *)  documentURL
fromViewController: (AGSViewController *)  fvc
atRect: (CGRect)  rect 
optional

The AGSPopupsContainer will call this method when there is a document that it wants to preview. By default, if this method is not implemented, it will preview the document with a UIDocumentInteractionController. If you have need to hide or show popovers before previewing you should implement this method and create the UIDocumentInteractionController manually.

Since
2.3
- (void) popupsContainer: (id< AGSPopupsContainer >)  popupsContainer
wantsToShowViewController: (AGSViewController *)  svc
ofType: (AGSPopupViewType viewType
fromViewController: (AGSViewController *)  fvc
atRect: (CGRect)  rect 
optional

The AGSPopupsContainer will call this method on the delegate when a view controller needs to be presented. This method is optional, but if you want to show view controllers in different ways than the standard modal way, then you need to implement this method.

Parameters
popupsContainerThe popup view controller
svcThe view controller that needs to be displayed
viewTypeThe predefined type of the view controller
fvcThe view controller that is currently being displayed
rectThe rect is in the coordinate space of the fromViewController. Only applicable if viewType is AGSPopupViewTypeUIImagePicker
Since
2.0
- (void) popupsContainerDidFinishViewingPopups: (id< AGSPopupsContainer >)  popupsContainer
optional

The method that is called when the user is done viewing the popups.

Parameters
popupsContainerThe popup view controller
Since
2.0