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
initialValueThe initial value consumed by the property wrapper
precisionThe precision spedified. If it is nil, the precision will be default to 2 digits.
numberFormatterThe number formatter used. Default to Double.defaultPercentageFormatter
-
Undocumented
Declaration
Swift
public var projectedValue: String? { get }
Percentage Structure Reference