<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.5.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "QuartzCore",
  "identifier" : "/documentation/QuartzCore/CAMediaTiming/repeatCount",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Core Animation"
    ],
    "preciseIdentifier" : "c:objc(pl)CAMediaTiming(py)repeatCount"
  },
  "title" : "repeatCount"
}
-->

# repeatCount

Determines the number of times the animation will repeat.

```
var repeatCount: Float { get set }
```

## Discussion

May be fractional. If the `repeatCount` is 0, it is ignored. Defaults to 0. If both [`repeatDuration`](/documentation/QuartzCore/CAMediaTiming/repeatDuration) and [`repeatCount`](/documentation/QuartzCore/CAMediaTiming/repeatCount) are specified the behavior is undefined.

Setting this property to <doc://com.apple.documentation/documentation/Swift/Float/greatestFiniteMagnitude> will cause the animation to repeat forever.

---

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)