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
nil
value 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
size
The size of the image to return.
callback
The callback with the image, run on the main thread.
-
Is the choice value equal to the given result?
Declaration
Swift
func isEqualToResult(_ result: RSDResult?) -> Bool
Parameters
result
A result to test for equality.
Return Value
true
if the values are equal.