The linear resistance for the behavior’s dynamic items when two slide against each other.
- iOS 7.0+
- Mac Catalyst 13.0+Beta
- tvOS 9.0+
Default value is
0.0, which corresponds to no friction. Use a value of
1.0 to apply strong friction. To apply an even stronger friction, you can use higher numbers.
Configuring a Dynamic Item Behavior
var resistance: CGFloat
The linear resistance for the behavior’s dynamic items, which reduces their linear velocity over time.
var isAnchored: Bool
A Boolean value indicating whether the item is anchored to its current position.
This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.Learn more about using Apple's beta software