<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ARKit",
  "identifier" : "/documentation/ARKit/ARCoachingOverlayView/setActive(_:animated:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "ARKit"
    ],
    "preciseIdentifier" : "c:objc(cs)ARCoachingOverlayView(im)setActive:animated:"
  },
  "title" : "setActive(_:animated:)"
}
-->

# setActive(_:animated:)

Controls whether coaching is in progress.

```
func setActive(_ active: Bool, animated: Bool)
```

## Parameters

`active`

A flag you set to indicate whether the coaching overlay should activate or deactivate.

`animated`

A flag that when <doc://com.apple.documentation/documentation/Swift/true>, fades the coaching overlay in or out. When you pass a value of <doc://com.apple.documentation/documentation/Swift/false>, the coaching overlay shows or hides instantly.

## Discussion

If the `animated` property of [`setActive(_:animated:)`](/documentation/ARKit/ARCoachingOverlayView/setActive(_:animated:)) is <doc://com.apple.documentation/documentation/Swift/true>, [`isActive`](/documentation/ARKit/ARCoachingOverlayView/isActive) and <doc://com.apple.documentation/documentation/UIKit/UIView/isHidden> are <doc://com.apple.documentation/documentation/Swift/false> while the coaching overlay is fading out. When the coaching overlay is deactivated without animation, or when the animation finishes, ARKit notifies you by calling [`coachingOverlayViewDidDeactivate(_:)`](/documentation/ARKit/ARCoachingOverlayViewDelegate/coachingOverlayViewDidDeactivate(_:)).

---

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)