RSDFormStepDataSourceObject
open class RSDFormStepDataSourceObject : RSDFormStepDataSource
RSDFormStepDataSourceObject
is a concrete implementation of the RSDFormStepDataSource
protocol.
-
The delegate associated with this data source.
Declaration
Swift
open weak var delegate: RSDFormStepDataSourceDelegate?
-
The step associated with this data source.
Declaration
Swift
public let step: RSDStep
-
The UI hints supported by this data source.
Declaration
Swift
public let supportedHints: Set<RSDFormUIHint>
-
The current task path.
Declaration
Swift
public private(set) var taskPath: RSDTaskPath
-
The table sections for this data source.
Declaration
Swift
open private(set) var sections: [RSDTableSection]
-
The initial result when the data source was first displayed.
Declaration
Swift
open private(set) var initialResult: RSDCollectionResult?
-
Initialize a new
RSDFormStepDataSourceObject
.Declaration
Swift
public init(step: RSDStep, taskPath: RSDTaskPath, supportedHints: Set<RSDFormUIHint>? = nil, sections: [RSDTableSection]? = nil, initialResult: RSDCollectionResult? = nil)
Parameters
step
The RSDStep for this data source.
taskPath
The current task path for this data source.
supportedHints
The supported UI hints for this data source.
sections
The sections to use with this data source. If
nil
, the base class implementation will set up the sections using the step.initialResult
The initial result to use to set up this source. If
nil
, the base class will look in the previous results of the task path. -
The collection result associated with this data source. The default implementation is to search the
taskPath
for a matching result and if that fails to return a new instance created usinginstantiateCollectionResult()
.Declaration
Swift
open func collectionResult() -> RSDCollectionResult
Return Value
The appropriate collection result.
-
Instantiate a collection result of the appropriate object type for this data source. The default implementation returns a new instance of
RSDCollectionResultObject
.Declaration
Swift
open func instantiateCollectionResult() -> RSDCollectionResult
Return Value
The appropriate collection result.
-
Instantiate the appropriate answer result for the given item group.
Declaration
Swift
open func instantiateAnswerResult(for itemGroup: RSDInputFieldTableItemGroup) -> RSDAnswerResult?
Parameters
itemGroup
The item group for which to create a result.
Return Value
The answer result (if any).
-
What is the preferred ui hint for this input field that is supported by this table? By default, this will look for the uiHint from the inputField to be included in the supported hints and if not, will return the preferred ui hint for the data type.
Declaration
Swift
open func preferredUIHint(for inputField: RSDInputField) -> RSDFormUIHint
Return Value
The ui hint to return.
-
Does this ui hint require an exclusive section? This sets up a section with one and only one ItemGroup for certain ui hints.
Declaration
Swift
open func requiresExclusiveSection(for itemGroup: RSDTableItemGroup) -> Bool
Parameters
uiHint
The ui hint to test.
Return Value
true
if the ui hint type requires it’s own table section. -
Instantiate the appropriate item group for this input field.
Declaration
Swift
open func instantiateTableItemGroup(for inputField: RSDInputField, beginningRowIndex: Int) -> RSDTableItemGroup
Parameters
inputField
The input field to convert to an item group.
beginningRowIndex
The beginning row index for this item group.
Return Value
The instantiated item group.