blob: ee2c43632c8888c033ef1c868320f44fea9856b8 (
plain) (
tree)
|
|
//
// UIViewController+Extensions.swift
// foray
//
// Created by Nicholas Tay on 24/3/2022.
//
import Foundation
import UIKit
protocol HasCustomView {
associatedtype CustomView: UIView
}
extension HasCustomView where Self: UIViewController {
internal var customView: CustomView {
guard let view = self.view as? CustomView else {
fatalError("Could not cast custom view")
}
return view
}
}
|