INNER CODE UNIT · Swift

initUIComponents

AmolGangadhare/flutter_barcode_scanner · ios/Classes/SwiftFlutterBarcodeScannerPlugin.swift:251

    func initUIComponents(){
        if isOrientationPortrait {
            screenHeight = (CGFloat)((SwiftFlutterBarcodeScannerPlugin.scanMode == ScanMode.QR.index) ? (screenSize.width * 0.8) : (screenSize.width * 0.5))
            
        } else {
            screenHeight = (CGFloat)((SwiftFlutterBarcodeScannerPlugin.scanMode == ScanMode.QR.index) ? (screenSize.height * 0.6) : (screenSize.height * 0.5))
        }
        
        
        self.initBarcodeComponents()
    }
    
    
    // Inititlize components
    func initBarcodeComponents(){
        
        let deviceDiscoverySession = AVCaptureDevice.DiscoverySession(deviceTypes: [.builtInWideAngleCamera], mediaType: AVMediaType.video, position: .back)
        // Get the back-facing camera for capturing videos

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…