YYTextView 支持iOS15扫描文本

class YYTextViewCamera: YYTextView {
    override func canPerformAction(_ action: Selector, withSender sender: Any?) -> Bool {
        let allow = super.canPerformAction(action, withSender: sender)
        if #available(iOS 15.0, *) {
            if allow == false,(action == #selector(captureTextFromCamera(_:))) {
                return true
            }
        }
        return allow
    }
}

你可能感兴趣的:(YYTextView 支持iOS15扫描文本)