BarcodeScanner icon indicating copy to clipboard operation
BarcodeScanner copied to clipboard

showsCameraButton is inverted

Open undeaDD opened this issue 4 years ago • 0 comments

Code in question:

CameraViewController.swift

  public var showsCameraButton: Bool = false {
    didSet {
      cameraButton.isHidden = showsCameraButton
    }
  }

Input true -> CameraButton is hidden Input false -> CameraButton is visible


There are 2 easy ways to fix this:

  • rename variable to 'hideCameraButton'
  • add boolean inversion '!' inside didSet block

Thanks for the awesome pod undeaD_D

undeaDD avatar May 12 '21 10:05 undeaDD