ScaledMetric

A dynamic property that scales a numeric value.

ComponentiOS 14.0+macOS 11.0+tvOS 14.0+watchOS 7.0+ScaledMetric in SwiftUI

Declaration

React
import { ScaledMetric } from 'swiftui-react-native';
Swift
@propertyWrapper struct ScaledMetric<Value> where Value : BinaryFloatingPoint

Initializers

2 SwiftUI initializers back <ScaledMetric>. The props you pass pick one.

React
<ScaledMetric
  wrappedValue: number
>
  children: (value: number) => ReactNode
</ScaledMetric>
Swift
init(wrappedValue: Value)
  • children*(value: number) => ReactNode

    Renders the value, again whenever it changes.

  • wrappedValue*number

Also takes the common view props: modifiers, style and testID.

See also

More in State and environment.