Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
// Youtube:
// Source:
import UIKit
protocol RequestCameraAuthorizationViewDelegate: class {
func requestCameraAuthorizationActionButtonTapped()
class RequestCameraAuthorizationView: UIView {
@IBOutlet private weak var contentView: UIView!
@IBOutlet private weak var cameraImageView: UIImageView!
@IBOutlet private weak var titleLabel: UILabel!
@IBOutlet private weak var messageLabel: UILabel!
@IBOutlet private weak var actionButton: UIButton!
weak var delegate: RequestCameraAuthorizationViewDelegate?
override init(frame: CGRect) {
super.init(frame: frame)
required init?(coder: NSCoder) {
super.init(coder: coder)
private func customInit() {
let bundle = Bundle.main
let nibName = String(describing: Self.self)
bundle.loadNibNamed(nibName, owner: self, options: nil)
contentView.frame = bounds
contentView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
@IBAction func actionButtonHandler(btn: UIButton) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment