|
ArcGIS Runtime SDK for iOS
100.9
|
A popup manager.
Instances of this class represent a popup manager that contains the necessary business logic for displaying and editing popup information for geo-elements. This class is useful, for instance, if you want to create your own View Controller for displaying AGSPopup instead of using AGSPopupsViewController.
Properties | |
| AGSPopupAttachmentManager * | attachmentManager |
| AGSSketchEditor * | currentSketchEditor |
| NSString * | customDescriptionHTML |
| id< AGSPopupManagerDelegate > | delegate |
| NSArray< AGSPopupField * > * | displayFields |
| NSArray< AGSPopupField * > * | editableDisplayFields |
| BOOL | editing |
| NSString * | editSummary |
| AGSFeatureType * | featureType |
| BOOL | geoElementValid |
| AGSPopup * | popup |
| BOOL | shouldAllowDelete |
| BOOL | shouldAllowEdit |
| BOOL | shouldAllowEditAttachments |
| BOOL | shouldAllowEditGeometry |
| BOOL | shouldShowAttachments |
| BOOL | shouldShowCustomDescriptionHTML |
| BOOL | shouldShowEditSummary |
| BOOL | shouldShowMedia |
| AGSSymbol * | symbol |
| NSString * | title |
| - (void) cancelEditing |
Cancels the editing of the popup. This rolls the AGSGeoElement back to it's original state.
| - (nullable AGSDomain*) domainForField: | (AGSPopupField *) | popupField |
Returns the AGSDomain associated with a given AGSPopupField
| - (id<AGSCancelable>) evaluateExpressionsWithCompletion: | (void(^)(NSArray< AGSPopupExpressionEvaluation * > *__nullable results, NSError *__nullable error)) | completion |
Asynchronously evaluates all expressions, including Arcade FeatureSet functions available at AGSPopupDefinition::expressions. This method must be called before displaying the popup information in a UI and after finishEditingWithCompletion: so you can use synchronous methods AGSPopupManager::formattedValueWithPopupField: and stringForTemplatedString: and property AGSPopupManager::customDescriptionHTML to get the formatted NSString representation. If there are no AGSPopupDefinition::expressions then result array will be empty. The AGSPopupExpression may be used in the AGSPopupDefinition::fields, AGSPopupDefinition.media, AGSPopupDefinition.title and AGSPopupDefinition.description.
| completion | Block that is invoked when the operation finishes. The results parameter is populated if the operation completed successfully, otherwise the error parameter is populated. |
| - (BOOL) featureTypeChangeRequiresUserNoficationForTemplate: | (nullable AGSFeatureTemplate *) | featureTemplate |
Method you can call to determine if you need to notify the user when a AGSFeatureType is going to change.
| featureTemplate | The template that the user wants to change to. |
#featureTypeChangeRequiresUserNotificationForTemplate instead | - (BOOL) featureTypeChangeRequiresUserNotificationForTemplate: | (nullable AGSFeatureTemplate *) | featureTemplate |
Method you can call to determine if you need to notify the user when a AGSFeatureType is going to change.
| featureTemplate | The template that the user wants to change to. |
| - (nullable AGSPopupField*) fieldForName: | (NSString *) | fieldName |
Returns the AGSPopupField for a given field name.
| - (BOOL) fieldIsNullable: | (AGSPopupField *) | popupField |
Returns whether or not a given AGSPopupField allows null values.
| - (BOOL) fieldIsTypeIDField: | (AGSPopupField *) | popupField |
Returns whether or not a given AGSPopupField is the TypeID field.
| - (AGSFieldType) fieldTypeForField: | (AGSPopupField *) | popupField |
Returns the field type for a given AGSPopupField.
| - (void) finishEditingWithCompletion: | (void(^)(NSError *__nullable error)) | completion |
Finish editing the popup. Async method that calls back when complete. This method commits any attachment and attribute changes to the AGSGeoElement.
| - (NSString*) formattedValueForField: | (AGSPopupField *) | popupField |
Returns a string you can use in a display for the current popup field's value. String will have the proper formatting based on the field type and AGSPopupField configuration. Dates and times are returned in the local timezone. If AGSPopupDefinition::expressions is not empty then the AGSPopupField may be using expressions with Arcade FeatureSet functions. Use evaluateExpressionsWithCompletion: (AGSPopup) to evaluate the Arcade expressions before trying to get the formatted NSString representation of the popup field's value, otherwise it may return an empty string.
| - (instancetype) initWithPopup: | (AGSPopup *) | popup |
Initializes an AGSPopupManager with an AGSPopup. This initializer will retain the passed in popup strongly. If the AGSGeoElement associated with the popup conforms to AGSLoadable it must be loaded for the AGSPopupManager to work properly.
| - (NSString *) labelForField: | (AGSPopupField *) | popupField |
Returns a user-friendly display name for the provided popup field
| - (NSInteger) lengthForField: | (AGSPopupField *) | popupField |
Returns the field length given an AGSPopupField.
| - (nullable NSNumber*) numberFromString: | (NSString *) | stringValue | |
| field: | (AGSPopupField *) | popupField | |
Creates correct number type from a string. Uses the AGSPopupField to determine type of number to return (int, double, etc)
numberFromString:field:error: instead. | - (nullable NSNumber*) numberFromString: | (NSString *) | stringValue | |
| field: | (AGSPopupField *) | popupField | |
| error: | (NSError **) | error | |
Creates correct number type from a string. Uses the AGSPopupField to determine type of number to return (int, double, etc). If the string contains invalid characters it will return nil and fill out the appropriate error. If the string is parsed correctly but the number is out of range for the field's range domain (if there is one) then it will return nil. If the string is parsed correctly but the number is out of numeric range for the appropriate field type then it will return nil and fill out the appropriate error.
| - (nullable NSString*) rangeValidationTextForField: | (AGSPopupField *) | popupField |
Returns a string that you can display in the UI for informing the user of the valid range for numeric input. Only returns a non-nil value for when there is a range domain associated with the field.
| - (BOOL) startEditing |
Starts editing of the popup. This does some work, like copying the original attributes, etc.
| - (nullable NSString*) stringForTemplatedString: | (NSString *) | templatedString |
Substitutes attribute templates in a string with actual values. If AGSPopupDefinition::expressions is not empty then the AGSPopupField may be using expressions with Arcade FeatureSet functions. Use evaluateExpressionsWithCompletion: (AGSPopup) to evaluate the Arcade expressions before trying to get the NSString for templated string, otherwise it may return an empty string.
| templatedString | The templated string. |
| - (BOOL) updateFeatureTypeWithTemplate: | (nullable AGSFeatureTemplate *) | featureTemplate | |
| changeMode: | (AGSPopupFeatureTypeChangeMode) | changeMode | |
| validationError: | (NSError **) | validationError | |
Update the feature type of the AGSGeoElement associated with the popup. Returns YES if the new value passes validation.
| - (BOOL) updateValue: | (nullable id) | newValue | |
| field: | (AGSPopupField *) | popupField | |
| validationError: | (NSError **) | validationError | |
Update the value of a field in the AGSGeoElement associated with the popup. This function expects you to pass at least the correct type of value for the field. The only exception to that is that you can pass a string for numeric fields and this function will do the work of converting it to the appropriate number type for the specified field. Returns YES if the new value passes validation.
| - (nullable NSError*) validationErrorForField: | (AGSPopupField *) | popupField |
Gets the validation error, if any, currently associated with an AGSPopupField.
| - (nullable NSError*) validationWarningForField: | (AGSPopupField *) | popupField |
Gets the validation warning, if any, currently associated with an AGSPopupField.
| - (nullable id) valueForField: | (AGSPopupField *) | popupField |
Returns the actual value that is in the AGSGeoElement for a given AGSPopupField. This method is "safe" (returns nil instead of NSNull)
|
readnonatomicstrong |
The attachment manager for this popup
|
readnonatomicstrong |
The current sketch editor that is used for editing the geometry of the popup. This is used for the AGSPopupManager to determine when the geometry of the popup being edited changes. This allows the AGSPopupManager to set the validity of the geoElement accordingly.
|
readnonatomiccopy |
The text to display as the custom HTML description. If AGSPopupDefinition::expressions is not empty then the custom HTML description may be using expressions with Arcade FeatureSet functions. Use evaluateExpressionsWithCompletion: to evaluate the Arcade expressions before trying to get the AGSPopupManager::customDescriptionHTML, otherwise it may not return the correct description.
|
readwritenonatomicweak |
A delegate of the popup manager that is notified about changes in the popup state or validity.
|
readnonatomiccopy |
Convenience for getting the AGSPopupFields that are for viewing
|
readnonatomiccopy |
Convenience for getting the popup fields that are editable
|
readnonatomicassign |
Whether or not currently in editing mode
|
readnonatomiccopy |
The edit summary text.
|
readnonatomicstrong |
The current AGSFeatureType, if any, of the AGSGeoElement
|
readnonatomicassign |
Whether or not the AGSGeoElement is in a valid state as far as the values it has set in its attributes and it's geometry.
|
readnonatomicunsafe_unretained |
The associated AGSPopup. This property is marked unsafe_unretained because it depending on how you instantiate the AGSPopupManager, the AGSPopup you pass in may be retained or not. If the AGSGeoElement associated with the popup conforms to AGSLoadable it must be loaded for the AGSPopupManager to work properly. See the individual initializers for more information.
|
readnonatomicassign |
Whether or not the popup view controller should allow deleting. Takes into account if the table allows deleting the feature and the Popup settings. Takes into account OBAC and the popup definition as well.
|
readnonatomicassign |
Whether or not the popup view controller should allow editing. Takes into account if it is a new feature. In which case even if allowEdit on the popup is false we still need to show the edit button in the popup if it's a brand new feature. Takes into account OBAC and the popup definition as well.
|
readnonatomicassign |
Whether or not the popup view controller should allow editing the attachments. Takes into account the popupDefinition.showAttachments and if we have an attachment manager and if the layer actually has attachments.
|
readnonatomicassign |
Whether or not the popup view controller should allow editing the geometry. Takes into account if we are creating a new geometry, if dealing with only a table, etc. Takes into account OBAC and the popup definition as well.
|
readnonatomicassign |
Whether or not the popup view controller should show the attachments. Takes into account the popupDefinition.showAttachments and if we have an attachment manager and if the layer actually has attachments.
|
readnonatomicassign |
Whether or not the popup view controller should show the custom description HTML.
|
readnonatomicassign |
Whether or not the popup view controller should show the edit info summary.
|
readnonatomicassign |
Whether or not the popup view controller should show the media.
|
readnonatomicstrong |
Symbol used by the popup's geo-element
|
readnonatomiccopy |
The text to display as the popup title.