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

# captureTextFromCamera(responder:identifier:)

Creates an action for capturing text using the device’s camera.

```
class func captureTextFromCamera(responder: any UIResponder & UIKeyInput, identifier: UIAction.Identifier?) -> Self
```

## Parameters

`responder`

The [`UIKeyInput`](/documentation/UIKit/UIKeyInput) responder to send the [`captureTextFromCamera(_:)`](/documentation/UIKit/UIResponder/captureTextFromCamera(_:)) message to.

`identifier`

The unique identifier for the action. Specify `nil` to let this method create a unique identifier for you.

---

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)