FUIOnboardingScanViewController
public class FUIOnboardingScanViewController : UIViewController, UICollectionViewDataSource, UICollectionViewDelegate, FUIBlurNavigationBarViewController
extension FUIOnboardingScanViewController: PHPhotoLibraryChangeObserver
This controller is to display the scanner view to scan a QR code for app activation. It is also displaying the image thumbnails from camera roll and a button to start photo picker that user may choose the QR code image directly.
Theming
Supported style classes
fdlFUIOnboardingScanViewController
fdlFUIOnboardingScanViewController_cancelButton
fdlFUIOnboardingScanViewController_flashButton
fdlFUIOnboardingScanViewController_choosePhotoButton
fdlFUIOnboardingScanViewController_arrowButton
fdlFUIOnboardingScanViewController_scanGuidesImageView
fdlFUIOnboardingScanViewController_photoPicker_navigationBar
Attention
The delegate object with type FUIOnboardingScanViewControllerDelegate
is declared as a weak reference. On deallocation it will be automatically set to nil. To keep it alive as expected, developer should retain the delegate object during its whole execution scope.
-
The title on the FUIOnboardingScanView. The default string is from localized strings file - “Scan”
Declaration
Swift
public var scanViewTitleString: String?
-
The title of the alert when user selects an image from photo library for a QR code on scanner but scanner could not find a valid QR code on that image. The default string is from localized strings file - “Scan Unsuccessful”
Declaration
Swift
public var scanUnsuccessfulTitleString: String?
-
The message of the alert when user selects an image from photo library for a QR code on scanner but scanner could not find a valid QR code on that image. The default string is from localized strings file - “Please select a QR code image.”
Declaration
Swift
public var scanUnsuccessfulMessageString: String?
-
The string to be used on the button to dismiss the alert. The default string is from localized strings file - “OK”
Declaration
Swift
public var okButtonString: String?
-
The title of the alert when user got the QR code from either scanner or photo library for onboarding activation. However, the system does not recognize the QR code. The default string is from localized strings file - “Invalid QR Code”
Declaration
Swift
public var invalidQRCodeTitleString: String?
-
The message of the alert when user got the QR code from either scanner or photo library for onboarding activation. However, the system does not recognize the QR code. The default string is from localized strings file - “The QR code was not recognized.”
Declaration
Swift
public var invalidQRCodeMessageString: String?
-
The title of the alert when user tapped the “Choose Photo icon” but the permission to access to the photo library was not granted. The default string is from localized strings file - “Allow Access to Photos”
Declaration
Swift
public var allowPhotoAccessTitleString: String?
-
The message of the alert when user tapped the “Choose Photo icon” but the permission to access to the photo library was not granted. The default string is from localized strings file - “To choose a QR code image, please give access to your photos in your device’s privacy settings.”
Declaration
Swift
public var allowPhotoAccessMessageString: String?
-
The title of the alert when user enter this scan view but the permission to access camera was not granted. The default string is from localized strings file - “Allow Access to Camera”
Declaration
Swift
public var allowCameraAccessTitleString: String?
-
The message of the alert when user enter this scan view but the permission to access camera was not granted. The default string is from localized strings file - “To scan using the camera, please give access to your camera in your device’s privacy settings.”
Declaration
Swift
public var allowCameraAccessMessageString: String?
-
The action title string not to go to the Settings app for the alert when the permission to access camera or photo library was not granted. The default string is from localized strings file - “Not Now”
Declaration
Swift
public var notNowActionString: String?
-
The action title string for going to the Settings app for the alert when the permission to access camera or photo library was not granted. The default string is from localized strings file - “Settings”
Declaration
Swift
public var settingsActionString: String?
-
Undocumented
Declaration
Swift
public var barcodeScanner: FUIBarcodeScanner? { get set }
-
The view to be displayed on top of the scan view when a QR code is validated. A default
FUIOnboardingScanConfirmView
will be provided as default view. Developer may substitute this to a custom view by setting this property.Declaration
Swift
public var scanConfirmationView: UIView?
-
This property indicates if to use camera only to scan.
If this property is
false
, in addition to use camera to scan the onboarding code, user can also choose an QRCode image from the photo library to scan.The default is
false
.Declaration
Swift
public var usesCameraOnly: Bool
-
The block of code to be executed when the “Cancel” button is tapped.
The default behavior when “Cancel” button is tapped is back to either
FUIWelcomeScreen
orFUIActivationScreen
. Then thisdidCancel
block is invoked.Declaration
Swift
public var didCancel: (() -> Void)?
-
The
FUIOnboardingScanViewControllerDelegate
implementation.Declaration
Swift
public weak var delegate: FUIOnboardingScanViewControllerDelegate?
-
Use this function to create a
FUIOnboardingScanViewController
instance loading from storyboard.Declaration
Swift
public class func createInstanceFromStoryboard() -> FUIOnboardingScanViewController
-
Undocumented
Declaration
Swift
public override func viewWillAppear(_ animated: Bool)
-
Undocumented
Declaration
Swift
public func photoLibraryDidChange(_ changeInstance: PHChange)