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 -
Does this item group require an exclusive section?
Declaration
Swift
public let requiresExclusiveSection: Bool -
Default initializer.
Declaration
Swift
public init(beginningRowIndex: Int, items: [RSDTableItem], inputField: RSDInputField, uiHint: RSDFormUIHint, answerType: RSDAnswerResultType, requiresExclusiveSection: Bool? = nil)Parameters
beginningRowIndexThe first row of the item group.
itemsThe table items included in this item group.
inputFieldThe input field associated with this item group.
uiHintThe UI hint.
answerTypeThe answer type.
-
Convenience initializer.
Declaration
Swift
public init(beginningRowIndex: Int, tableItem: RSDTextInputTableItem)Parameters
beginningRowIndexThe first row of the item group.
tableItemA 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 { get } -
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? { get } -
Set the new answer value. This will throw an error if the value isn’t valid. Otherwise, it will set the answer.
Throws
RSDInputFieldErrorif the answer is invalid.Declaration
Swift
open func setAnswer(_ newValue: Any?) throwsParameters
newValueThe new value for the answer.
-
Set the answer from a previous run to the given value.
Declaration
Swift
open func setPreviousAnswer(from jsonValue: Any?) throws -
Set the default answer for the item group. The base class implementation does nothing.
Declaration
Swift
open func setDefaultAnswerIfValid() -> BoolReturn Value
trueif the answer was updated andfalseif the answer was unchanged. -
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
RSDInputFieldErrorif the answer is invalid.Declaration
Swift
open func setAnswer(from result: RSDResult) throwsParameters
resultThe 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 { get }Return Value
A
Boolindicating if answer is valid. -
Whether or not the question is optional.
Declaration
Swift
open var isOptional: Bool { get }
View on GitHub
RSDInputFieldTableItemGroup Class Reference