ArcGIS Runtime SDK for iOS: <AGSPopupsViewControllerDelegate> Protocol Reference
ArcGIS Runtime SDK for iOS  100.15
<AGSPopupsViewControllerDelegate> Protocol Reference

Description

A delegate of AGSPopupsViewController.

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

All methods of this protocol are optional.

Since
100

Instance Methods

(void) - popupsViewController:didCancelEditingForPopup:
 
(void) - popupsViewController:didChangeFeatureTypeForPopup:
 
(void) - popupsViewController:didChangeToCurrentPopup:
 
(void) - popupsViewController:didDeleteForPopup:
 
(void) - popupsViewController:didFailToDeleteForPopup:withError:
 
(void) - popupsViewController:didFailToFinishEditingForPopup:withError:
 
(void) - popupsViewController:didFinishEditingForPopup:
 
(void) - popupsViewController:didStartEditingForPopup:
 
(nullable UIView *) - popupsViewController:footerViewForPopup:
 
(nullable UIView *) - popupsViewController:headerViewForPopup:
 
(void) - popupsViewController:readyToEditGeometryWithSketchEditor:forPopup:
 
(BOOL) - popupsViewController:shouldAutorotateForViewController:ofType:
 
(nullable AGSSketchEditor *) - popupsViewController:sketchEditorForPopup:
 
(void) - popupsViewController:validityChanged:forPopup:
 
(BOOL) - popupsViewController:wantsToDeleteForPopup:
 
(void) - popupsViewController:wantsToHideViewController:ofType:
 
(void) - popupsViewController:wantsToPreviewDocumentAtURL:fromViewController:atRect:
 
(void) - popupsViewController:wantsToShowViewController:ofType:fromViewController:atRect:
 
(void) - popupsViewController:willFinishEditingForPopup:
 
(void) - popupsViewControllerDidFinishViewingPopups:
 

Method Documentation

◆ popupsViewController:didCancelEditingForPopup:

- (void) popupsViewController: (AGSPopupsViewController *)  popupsViewController
didCancelEditingForPopup: (AGSPopup *)  popup 
optional

The method called by the popups view controller when the user cancels editing the current popup.

Parameters
popupsViewControllerThe popups view controller.
popupThe popup whose geo element was started to be edited but later canceled.
Since
100

◆ popupsViewController:didChangeFeatureTypeForPopup:

- (void) popupsViewController: (AGSPopupsViewController *)  popupsViewController
didChangeFeatureTypeForPopup: (AGSPopup *)  popup 
optional

The popups view controller will call this when the user switches a feature type for the current popup. Potentially at this point symbology will change for the feature. Currently this is only called for AGSArcGISFeature popups.

Parameters
popupsViewControllerThe popups view controller.
popupThe popup whose feature type was changed.
Since
100

◆ popupsViewController:didChangeToCurrentPopup:

- (void) popupsViewController: (AGSPopupsViewController *)  popupsViewController
didChangeToCurrentPopup: (AGSPopup *)  popup 
optional

The popups view controller will call this method when the currently showing popup changes.

Parameters
popupsViewControllerThe popups view controller.
popupThe popup which is currently being displayed.
Since
100

◆ popupsViewController:didDeleteForPopup:

- (void) popupsViewController: (AGSPopupsViewController *)  popupsViewController
didDeleteForPopup: (AGSPopup *)  popup 
optional

The method called by the popups view controller when a geo element was successfully deleted.

Parameters
popupsViewControllerThe popups view controller.
popupThe popup whose geo element was deleted.
Since
100

◆ popupsViewController:didFailToDeleteForPopup:withError:

- (void) popupsViewController: (AGSPopupsViewController *)  popupsViewController
didFailToDeleteForPopup: (AGSPopup *)  popup
withError: (NSError *)  error 
optional

The method called by the popups view controller when it fails to delete a geo element. If you do not implement this method, then the popups view controller 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
popupsViewControllerThe popups view controller.
popupThe popup whose geo element was meant to be deleted.
errorThe error that occurred.
Since
100

◆ popupsViewController:didFailToFinishEditingForPopup:withError:

- (void) popupsViewController: (AGSPopupsViewController *)  popupsViewController
didFailToFinishEditingForPopup: (AGSPopup *)  popup
withError: (NSError *)  error 
optional

The method called by the popups view controller 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 popups view controller will show an alert depicting the localized description of the error.

Parameters
popupsViewControllerThe popups view controller.
popupThe popup whose geo element was edited.
errorThe error that occurred when trying to finish editing.
Since
100

◆ popupsViewController:didFinishEditingForPopup:

- (void) popupsViewController: (AGSPopupsViewController *)  popupsViewController
didFinishEditingForPopup: (AGSPopup *)  popup 
optional

The method called by the popups view controller when the user is done editing the current popup.

Note
This is where you might make the appropriate calls to keep the server in sync with the client. For example, you might call applyEditsWithCompletion: if dealing with AGSArcGISFeature objects.
Parameters
popupsViewControllerThe popups view controller.
popupThe popup whose geo element was edited.
Since
100

◆ popupsViewController:didStartEditingForPopup:

- (void) popupsViewController: (AGSPopupsViewController *)  popupsViewController
didStartEditingForPopup: (AGSPopup *)  popup 
optional

The method called by the popups view controller when the user begins editing the current popup.

Parameters
popupsViewControllerThe popups view controller.
popupThe popup whose geo element needs to be edited.
Since
100

◆ popupsViewController:footerViewForPopup:

- (nullable UIView *) popupsViewController: (AGSPopupsViewController *)  popupsViewController
footerViewForPopup: (AGSPopup *)  popup 
optional

Implement this method if you want to provide a custom footer view for the popup.

Parameters
popupsViewControllerThe popups view controller.
popupThe popup the footer view will display for.
Since
100

◆ popupsViewController:headerViewForPopup:

- (nullable UIView *) popupsViewController: (AGSPopupsViewController *)  popupsViewController
headerViewForPopup: (AGSPopup *)  popup 
optional

Implement this method if you want to provide a custom header view for the popup.

Parameters
popupsViewControllerThe popups view controller.
popupThe popup the header view will display for.
Since
100

◆ popupsViewController:readyToEditGeometryWithSketchEditor:forPopup:

- (void) popupsViewController: (AGSPopupsViewController *)  popupsViewController
readyToEditGeometryWithSketchEditor: (nullable AGSSketchEditor *)  sketchEditor
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 taps the toolbar item for editing the geometry. Or if the editing mode is "Geometry Inline", it will happen when editing begins. The sketchEditor is the sketch editor that was earlier passed to the popups view controller through the popupsViewController:sketchEditorForPopup: delegate method. If you want to make programmatic changes to the popup's geometry, you should go through this sketch editor. This allows the popups view controller to know when the geometry changes so that it can update it's UI appropriately (ie. enabling the "Done" button).

Parameters
popupsViewControllerThe popup view controller.
sketchEditorThe sketch editor that should be used for editing a popup's geometry.
popupThe popup whose geo element's geometry needs to be edited.
Since
100

◆ popupsViewController:shouldAutorotateForViewController:ofType:

- (BOOL) popupsViewController: (AGSPopupsViewController *)  popupsViewController
shouldAutorotateForViewController: (UIViewController *)  vc
ofType: (AGSPopupViewControllerType viewType 
optional

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

Parameters
popupsViewControllerThe popups view controller.
vcThe view controller that needs to respond to orientation change.
viewTypeThe predefined type of the view controller.
Since
100

◆ popupsViewController:sketchEditorForPopup:

- (nullable AGSSketchEditor *) popupsViewController: (AGSPopupsViewController *)  popupsViewController
sketchEditorForPopup: (AGSPopup *)  popup 
optional

Tells the delegate that a sketch editor is required for an AGSPopup. The popupsViewController will listen for changes to the AGSSketchEditor to determine when the geometry is in a valid state. Depending upon the type of geometry (point, polygon, polyline, etc) required for the id<AGSGeoElement>, the delegate must return a sketch editor for editing the appropriate type of geometry. At this point the sketchEditor should be started and assigned to the appropriate AGSMapView.

Parameters
popupsViewControllerThe popup view controller.
popupThe popup of the id<AGSGeoElement> for which a sketch editor is required.
Since
100

◆ popupsViewController:validityChanged:forPopup:

- (void) popupsViewController: (AGSPopupsViewController *)  popupsViewController
validityChanged: (BOOL)  isValid
forPopup: (AGSPopup *)  popup 
optional

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

Parameters
popupsViewControllerThe popups view controller.
isValidA Boolean value indicating whether or not the geo element meets its known requirements to be saved to its datasource.
Since
100

◆ popupsViewController:wantsToDeleteForPopup:

- (BOOL) popupsViewController: (AGSPopupsViewController *)  popupsViewController
wantsToDeleteForPopup: (AGSPopup *)  popup 
optional

The method called by the popups view controller when the user confirms they want to delete the geo element. The implementer of this method must actually delete the geo element.

Note
This method will only be called for popups with a geo element that it don't know how to delete. Currently, the popup only knows how to delete AGSArcGISFeature objects. This method will be called for all other types of geo elements.
Parameters
popupsViewControllerThe popups view controller.
popupThe popup whose geo element needs to be deleted.
Returns
YES if the popup was successfully deleted, otherwise NO.
Since
100

◆ popupsViewController:wantsToHideViewController:ofType:

- (void) popupsViewController: (AGSPopupsViewController *)  popupsViewController
wantsToHideViewController: (UIViewController *)  vc
ofType: (AGSPopupViewControllerType viewType 
optional

The popups view controller will call this method on the delegate when a view controller needs to be hidden. You need to implement this if you implement popupsViewController: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
popupsViewControllerThe popups view controller.
vcThe view controller that needs to be hidden.
viewTypeThe predefined type of the view controller.
Since
100

◆ popupsViewController:wantsToPreviewDocumentAtURL:fromViewController:atRect:

- (void) popupsViewController: (AGSPopupsViewController *)  popupsViewController
wantsToPreviewDocumentAtURL: (NSURL *)  documentURL
fromViewController: (UIViewController *)  fvc
atRect: (CGRect)  rect 
optional

The popups view controller 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 UIDocumentInteractionController. If you have need to hide or show popovers before previewing, you should implement this method and create the document interaction controller manually.

Parameters
popupsViewControllerThe popups view controller.
documentURLThe URL of the document.
fvcThe view controller that is currently being displayed.
rectThe rect is in the coordinate space of fvc.
Since
100

◆ popupsViewController:wantsToShowViewController:ofType:fromViewController:atRect:

- (void) popupsViewController: (AGSPopupsViewController *)  popupsViewController
wantsToShowViewController: (UIViewController *)  svc
ofType: (AGSPopupViewControllerType viewType
fromViewController: (UIViewController *)  fvc
atRect: (CGRect)  rect 
optional

The popups view controller 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
popupsViewControllerThe popups 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 fvc. Only applicable if viewType is AGSPopupViewControllerTypeUIImagePicker.
Since
100

◆ popupsViewController:willFinishEditingForPopup:

- (void) popupsViewController: (AGSPopupsViewController *)  popupsViewController
willFinishEditingForPopup: (AGSPopup *)  popup 
optional

The method called by the popups view controller when the user is done editing the current popup. This method is called before popupsViewController:didFinishEditingForPopup and it is also called before feature updates are submitted to its table (when dealing with AGSFeature objects).

Parameters
popupsViewControllerThe popups view controller.
popupThe popup whose geo element was edited.
Since
100.3

◆ popupsViewControllerDidFinishViewingPopups:

- (void) popupsViewControllerDidFinishViewingPopups: (AGSPopupsViewController *)  popupsViewController
optional

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

Parameters
popupsViewControllerThe popups view controller.
Since
100