RSDInputFieldTableItemGroup

open class RSDInputFieldTableItemGroup : RSDTableItemGroup

RSDInputFieldTableItemGroup is used to represent a single input field.

  • The input field associated with this item group.

    Declaration

    Swift

    public let inputField: RSDInputField
  • The UI hint for displaying the component of the item group.

    Declaration

    Swift

    public let uiHint: RSDFormUIHint
  • The answer type for the input field result.

    Declaration

    Swift

    public let answerType: RSDAnswerResultType
  • Default initializer.

    Declaration

    Swift

    public init(beginningRowIndex: Int, items: [RSDTableItem], inputField: RSDInputField, uiHint: RSDFormUIHint, answerType: RSDAnswerResultType)

    Parameters

    beginningRowIndex

    The first row of the item group.

    items

    The table items included in this item group.

    inputField

    The input field associated with this item group.

    uiHint

    The UI hint.

    answerType

    The answer type.

  • Convenience initializer.

    Declaration

    Swift

    public init(beginningRowIndex: Int, tableItem: RSDTextInputTableItem)

    Parameters

    beginningRowIndex

    The first row of the item group.

    tableItem

    A single table item that can be used to build an answer.

  • Convenience property for accessing the identifier associated with the item group.

    Declaration

    Swift

    public var identifier: String
  • The answer for this item group. This is the answer stored to the RSDAnswerResult. The default implementation will return the privately stored answer if set and if not, will look to see if the first table item is recognized as a table item that stores an answer on it.

    Declaration

    Swift

    open var answer: Any
  • Set the new answer value. This will throw an error if the value isn’t valid. Otherwise, it will set the answer.

    Throws

    RSDInputFieldError if the answer is invalid.

    Declaration

    Swift

    open func setAnswer(_ newValue: Any?) throws

    Parameters

    newValue

    The new value for the answer.

  • Set the new answer value from a previous result. This will throw an error if the result isn’t valid. Otherwise, it will set the answer.

    Throws

    RSDInputFieldError if the answer is invalid.

    Declaration

    Swift

    open func setAnswer(from result: RSDResult) throws

    Parameters

    result

    The result that may have a previous answer.

  • Determine if the current answer is valid. Also checks the case where answer is required but one has not been provided.

    Declaration

    Swift

    open override var isAnswerValid: Bool

    Return Value

    A Bool indicating if answer is valid.