<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIFieldBehavior/springField()",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIFieldBehavior(cm)springField"
  },
  "title" : "springField()"
}
-->

# springField()

Creates and returns a spring field behavior.

```
class func springField() -> Self
```

## Return Value

A field behavior object that applies spring effects to items.

## Discussion

A spring field behavior object uses Hooke’s law to calculate the force applied to objects in the field. With this law, the amount of force is linearly proportional to the distance from the center of the field. An item entering this field oscillates with a period proportional to the inverse of its density. You can use this field behavior to keep items confined to a particular region. Use the item’s resistance to reduce its linear velocity (and thus the amount of oscillation) over time.

An item in a spring field oscillates continuously unless the spring forces are damped by friction or the item is affected by other fields.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)