INNER CODE UNIT · Swift
drawLine
AmolGangadhare/flutter_barcode_scanner · ios/Classes/SwiftFlutterBarcodeScannerPlugin.swift:533
private func drawLine() {
self.view.addSubview(scanLine)
scanLine.backgroundColor = hexStringToUIColor(hex: SwiftFlutterBarcodeScannerPlugin.lineColor)
scanlineRect = CGRect(x: xCor, y: yCor, width:self.isOrientationPortrait ? (screenSize.width*0.8) : (screenSize.height*0.8), height: 2)
scanlineStartY = yCor
var stopY:CGFloat
if SwiftFlutterBarcodeScannerPlugin.scanMode == ScanMode.QR.index {
let w = self.isOrientationPortrait ? (screenSize.width*0.8) : (screenSize.height*0.6)
stopY = (yCor + w)
} else {
let w = self.isOrientationPortrait ? (screenSize.width * 0.5) : (screenSize.height * 0.5)
stopY = (yCor + w)
}
scanlineStopY = stopY
}