SimpleScanViewControlleris a functionally complete card scanner, but has a simple UI that you can customize either by setting properties or by subclassing for full UI customization. Because
SimpleScanViewControlleruses programmatic UI layout you can subclass it for full customization.
ScanViewControlleris a battle tested UI that has scanned over 50 million cards and exposes some properties that you can set to adjust the UI. However,
ScanViewControlleruses storyboards for UI layout, so you can't subclass it. Eventually we'll move it over to programmatic UI layout as well by subclassing
SimpleScanViewControllerourselves, but for now we're confined to property setting only..
ScanBaseViewControllerexpects subclasses to implement. Our goal is to have a fully featured Card Scan implementation with a minimal UI that people can customize fully. You can use this directly or you can subclass and customize it. If you'd like to use an off-the-shelf design as well, we suggest using the
ScanViewController, which uses mature and well tested UI design patterns.
SimpleScanViewControllerUI looks something like this, with most of the constraints shown:
*Stringvariables that we use to set the copy
setup*Uifunctions for setting the visual look and feel
setup*Constraintsfor setting up autolayout
setupConstraintsfunctions that do a small bit of setup and call the
SimpleScanViewControllerto customize the look, feel, and layout for each component
CreditCardPredictionobject as the argument each time it has results you can show. Override this function to customize this behavior.
SimpleScanViewControllerhas a camera permission deny experience built in. If the user is prompted and denies access to the camera or they have been previously prompted and denied access,
SimpleScanViewControllerwill hide all non essential UI elements (the "description" text and the "torch" button) and show a button with a link to settings where the user can grant permission to the camera for your app. Please note, if the user updates the settings for your app, iOS will restart your app and you'll lose any in-memory state.
SimpleScanViewContollerinstead. Our expected use for
ScanViewControlleris to use a mature, well tested, and high converting UI out of the box, with only minor modifications.