To run the example project, clone the repo, and run pod install
from the Example directory first.
- iOS 13 or newer
- Swift 5
RegexScanner is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'RegexScanner'
To Use:
import RegexScanner
And simple call
let scannerView = RegexScanner.getScanner(regex: "[A-Z]{2}[0-9]{9}[A-Z]{2}") { value in
print(value)
}
present(scannerView, animated: true, completion: nil)
When the text is recognized, the view closes and the value is send to closure.
Do not forget add NSCameraUsageDescription
to your Info.plist
You can custom the texts using the scannerView.:
- buttonConfirmTitle
- buttonConfirmBackgroundColor
- viewTitle
Narlei Moreira, narlei.guitar@gmail.com
If do you like, give your ⭐️
RegexScanner is available under the MIT license. See the LICENSE file for more info.