ArcGIS Runtime SDK for iOS: AGSPopupsViewController Class Reference
ArcGIS Runtime SDK for iOS  100.5
AGSPopupsViewController Class Reference

Description

Instances of this class represent a view controller that provides the basic user interface (UI) and behavior for displaying and editing information about graphics in a popup. It is a container and manages a number of view controllers behind the scenes, each of which is designed for a specific purpose, such as editing an attribute, displaying media, managing attachments, etc. It manages transitions between these view controllers and displays the relevant one depending upon what the user intends to do.

See also
Note
The view controller needs access to the device photo library and camera in order to add image attachments to the popup. The app's Info.plist must contain the NSPhotoLibraryUsageDescription and NSCameraUsageDescription keys to permit this functionality.
Since
100
Inheritance diagram for AGSPopupsViewController:

Instance Methods

(void) - cancelEditingCurrentPopup
 
(void) - clearAllPopups
 
(void) - finishEditingCurrentPopupWithCompletion:
 
(instancetype) - initWithPopups:
 
(instancetype) - initWithPopups:containerStyle:
 
(void) - showAdditionalPopups:
 
(void) - startEditingCurrentPopup
 

Class Methods

(instancetype) + popupsViewControllerWithPopups:
 
(instancetype) + popupsViewControllerWithPopups:containerStyle:
 

Properties

UIBarButtonItem * actionButton
 
AGSPopupcurrentPopup
 
AGSSketchEditorcurrentSketchEditor
 
UIBarButtonItem * customActionButton
 
UIBarButtonItem * customDoneButton
 
AGSPopupAttachmentSize defaultAttachmentSize
 
id< AGSPopupsViewControllerDelegatedelegate
 
UIBarButtonItem * doneButton
 
AGSPopupsViewControllerGeometryEditingStyle geometryEditingStyle
 
BOOL inEditingMode
 
UIViewController * modalPresenter
 
NSArray< AGSPopup * > * popups
 
AGSPopupsViewControllerThemetheme
 

Method Documentation

§ cancelEditingCurrentPopup()

- (void) cancelEditingCurrentPopup

Cancels the editing process for the currently shown popup.

Since
100

§ clearAllPopups()

- (void) clearAllPopups

Clears all the popups currently being shown. This is useful if you want to reuse an existing popups container to display an entirely new set of popups. That way, the popups container doesn't have to reload from a NIB everytime it is shown.

Since
100

§ finishEditingCurrentPopupWithCompletion:()

- (void) finishEditingCurrentPopupWithCompletion: (nullable void(^)(NSError *__nullable error))  completion

Exit editing mode for the currently shown popup.

Parameters
completionblock that is invoked when the operation completes. The error argument is populated if a problem is encountered (for example, if one of the feature's attribute values does not satisfy its constraints) in which case the editing mode is not ended.
Since
100

§ initWithPopups:()

- (instancetype) initWithPopups: (nullable NSArray< AGSPopup * > *)  popups

Initializes an AGSPopupsViewController.

Parameters
popupsAn array of AGSPopup objects representing the popups to be displayed
Since
100

§ initWithPopups:containerStyle:()

- (instancetype) initWithPopups: (nullable NSArray< AGSPopup * > *)  popups
containerStyle: (AGSPopupsViewControllerContainerStyle containerStyle 

Initializes an AGSPopupsViewController.

Parameters
popupsAn array of AGSPopup objects representing the popups to be displayed
containerStylespecifies how the popups view controller will be displayed in its container. See AGSPopupsViewControllerContainerStyle
Since
100

§ popupsViewControllerWithPopups:()

+ (instancetype) popupsViewControllerWithPopups: (nullable NSArray< AGSPopup * > *)  popups

Initializes an AGSPopupsViewController.

Parameters
popupsAn array of AGSPopup objects representing the popups to be displayed
Since
100

§ popupsViewControllerWithPopups:containerStyle:()

+ (instancetype) popupsViewControllerWithPopups: (nullable NSArray< AGSPopup * > *)  popups
containerStyle: (AGSPopupsViewControllerContainerStyle containerStyle 

Initializes an AGSPopupsViewController.

Parameters
popupsAn array of AGSPopup objects representing the popups to be displayed
containerStylespecifies how the popups view controller will be displayed in its container. See AGSPopupsViewControllerContainerStyle
Since
100

§ showAdditionalPopups:()

- (void) showAdditionalPopups: (NSArray< AGSPopup * > *)  popups

Update the view controller to display additional popups. This is useful when the view controller is already displaying some popups, but you then want to display additional popups that were retrieved in the background, for example, as part of a query/identify operation.

Parameters
popupsAn array of AGSPopup objects representing the additional popups to be displayed
Since
100

§ startEditingCurrentPopup()

- (void) startEditingCurrentPopup

Start editing mode for the currently shown popup.

Since
100

Property Documentation

§ actionButton

- (UIBarButtonItem*) actionButton
readnonatomicstrong

The current button that appears on the right side of the Navigation Bar when the popup is in viewing mode (not editing).

Since
100

§ currentPopup

- (AGSPopup*) currentPopup
readnonatomicstrong

The current popup that is being viewed.

Since
100

§ currentSketchEditor

- (AGSSketchEditor*) currentSketchEditor
readnonatomicstrong

When in edit mode and geometry editing is allowed, this property returns the sketchEditor for editing the popup's geometry. This is the sketchEditor you passed to the AGSPopupsViewController in the popupsViewController:sketchEditorForPopup: delegate method. When editing is finished, the geometry of the sketch editor will be set on the current popup's graphic.

Since
100

§ customActionButton

- (UIBarButtonItem*) customActionButton
readwritenonatomicstrong

You can replace the button that appears on the right side of the Navigation Bar with a custom button through this property. This only applies to when the popup is in viewing mode (not editing).

Since
100

§ customDoneButton

- (UIBarButtonItem*) customDoneButton
readwritenonatomicstrong

You can replace the button that appears on the left side of the Navigation Bar with a custom button through this property. This only applies to when the popup is in viewing mode (not editing).

Since
100

§ defaultAttachmentSize

- (AGSPopupAttachmentSize) defaultAttachmentSize
readwritenonatomicassign

The default size that new attachments created and committed to a feature will have.

Since
100

§ delegate

- (id<AGSPopupsViewControllerDelegate>) delegate
readwritenonatomicweak

The delegate to be notified when a user interacts with the popups or edits graphics related to the popups. The delegate class must adopt the AGSPopupsViewControllerDelegate protocol.

Since
100

§ doneButton

- (UIBarButtonItem*) doneButton
readnonatomicstrong

The current done button that appears on the left side of the Navigation Bar when the popup is in viewing mode (not editing).

Since
100

§ geometryEditingStyle

- (AGSPopupsViewControllerGeometryEditingStyle) geometryEditingStyle
readwritenonatomicassign

The style that is used for editing.

Since
100

§ inEditingMode

- (BOOL) inEditingMode
readnonatomicassign

Indicates whether the view controller is in the process of editing a feature.

Since
100

§ modalPresenter

- (UIViewController*) modalPresenter
readwritenonatomicstrong

The UIViewController that should be used for presenting modal view controllers from within this AGSPopupsViewController. This is useful when using this view controller as a standalone object (for example, in a custom callout or a custom view) and when it's not part of a view controller hierarchy.

Since
100

§ popups

- (NSArray<AGSPopup*>*) popups
readwritenonatomiccopy

The popups to be displayed.

Since
100

§ theme

- (AGSPopupsViewControllerTheme*) theme
readwritenonatomicstrong

Defines the look and feel of the PopupsViewController.

Since
100