Contents

captureTextFromCamera(_:)

Starts scanning text using the device’s camera.

Declaration

func captureTextFromCamera(_ sender: Any?)

Parameters

  • sender:

    The object that invokes this method.

Discussion

To receive callbacks from the data scanner, the responder should conform to either the UIKeyInput or UITextInput protocol. If it conforms to UIKeyInput, the scanner calls the insertText: protocol method. If it conforms to UITextInput, the scanner calls the setMarkedText(_:selectedRange:) and unmarkText() protocol methods.

To determine whether the data scanner runs on the user’s device, pass captureTextFromCamera(_:) to the canPerformAction(_:withSender:) method.

See Also

Related Documentation