lnd-demo-app/Pods/QR-Code-Scanner-iOS/QR Code Scanner/CameraAccessDeniedViewController.swift

28 lines
800 B
Swift
Raw Normal View History

2023-06-08 06:36:06 +00:00
//
// CameraAccessDeniedViewController.swift
//
// Created by Jakub Dolejs on 28/03/2018.
// Copyright © 2018 Applied Recognition Inc. All rights reserved.
//
import UIKit
class CameraAccessDeniedViewController: UIViewController {
@IBOutlet var label: UILabel!
override func viewDidLoad() {
super.viewDidLoad()
if let appName = Bundle.main.infoDictionary?[kCFBundleNameKey as String] as? String {
label.text = String(format: "Camera access denied. Please go to settings and enable camera for %@.", appName)
}
}
@IBAction func openSettings() {
if let settingsURL = URL(string: UIApplication.openSettingsURLString) {
UIApplication.shared.open(settingsURL, options: [:], completionHandler: nil)
}
}
}