RSDNumberPickerDataSource
public protocol RSDNumberPickerDataSource : RSDPickerDataSource
A picker data source for picking a number.
-
Returns the minimum number allowed.
Declaration
Swift
var minimum: Decimal { get }
-
Returns the maximum number allowed.
Declaration
Swift
var maximum: Decimal { get }
-
Returns the step interval to use. If
nil
, then the step interval will default to advance by 1.Declaration
Swift
var stepInterval: Decimal? { get }
-
Returns the number formatter to use to format the displayed value and to parse the result.
Declaration
Swift
var numberFormatter: RSDNumberFormatterProtocol { get }
-
numberAnswer(from:)
Extension methodReturns the decimal number answer for a given selected answer.
Declaration
Swift
public func numberAnswer(from selectedAnswer: Any?) -> Decimal?
Parameters
selectedAnswer
The answer to convert.
Return Value
A text value for the answer to display to the user.
-
textAnswer(from:)
Extension methodReturns the text answer to display for a given selected answer.
Declaration
Swift
public func textAnswer(from selectedAnswer: Any?) -> String?
Parameters
selectedAnswer
The answer to convert.
Return Value
A text value for the answer to display to the user.