RSDChoice
public protocol RSDChoice
RSDChoice is used to describe a choice item for use with a multiple choice or multiple component input field.
-
A JSON encodable object to return as the value when this choice is selected. A
nilvalue indicates that the user has selected to skip the question orprefers not to answer
.Declaration
Swift
var value: Codable? -
Localized text string to display for the choice.
Declaration
Swift
var text: String? -
Additional detail text.
Declaration
Swift
var detail: String? -
For a multiple choice option, is this choice mutually exclusive? For example,
none of the above
.Declaration
Swift
var isExclusive: Bool -
Whether or not this choice has an image associated with it that should be returned by the fetch icon method.
Declaration
Swift
var hasIcon: Bool -
An icon image that can be used for displaying the choice.
Declaration
Swift
func fetchIcon(for size: CGSize, callback: @escaping ((UIImage?) -> Void))Parameters
sizeThe size of the image to return.
callbackThe callback with the image, run on the main thread.
-
Is the choice value equal to the given result?
Declaration
Swift
func isEqualToResult(_ result: RSDResult?) -> BoolParameters
resultA result to test for equality.
Return Value
trueif the values are equal.
View on GitHub
RSDChoice Protocol Reference