Percentage
@propertyWrapper
public struct Percentage
Percentage is used to define a double that presents a percentage value.
Version
1.9.4Date
31/03/2023-
Undocumented
Declaration
Swift
public var wrappedValue: Double
-
The constructor
Declaration
Swift
public init(wrappedValue initialValue: Double, precision: Int? = nil, numberFormatter: NumberFormatter = Double.defaultPercentageFormatter)
Parameters
initialValue
The initial value consumed by the property wrapper
precision
The precision spedified. If it is nil, the precision will be default to 2 digits.
numberFormatter
The number formatter used. Default to Double.defaultPercentageFormatter
-
Undocumented
Declaration
Swift
public var projectedValue: String? { get }