<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "DockKit",
  "identifier" : "/documentation/DockKit/DockAccessory/selectSubject(at:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "DockKit"
    ],
    "preciseIdentifier" : "s:7DockKit0A9AccessoryC13selectSubject2atySo7CGPointV_tYaKF"
  },
  "title" : "selectSubject(at:)"
}
-->

# selectSubject(at:)

Selects a subject to track at the supplied coordinates.

```
final func selectSubject(at unitPoint: CGPoint) async throws
```

## Discussion

There may be times when more than one subject is in a video frame. Use this method to track a specific subject within that frame
by passing a  location within the frame. The coordinates are relative to the top left of the video frame, and are values between `0` and `1`. If the framework doesn’t detect a subject at the passed coordinates, the method throws an error.

If you disable system tracking, this configuration change applies to any custom tracking for this dock accessory.
The configuration applies to any camera stream the app has open if system tracking is enabled.

Call this method when implementing your own custom tracking behavior.

> Throws: ``doc://com.apple.DockKit/documentation/DockKit/DockKitError/notConnected`` if device isn’t docked, or other errors if no subject is found at the position.

---

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)