class Button: UIButton { private class Subview: UIView { // Never allow isUserInteractionEnabled in any button subview override var isUserInteractionEnabled: Bool { get { false } set { super.isUserInteractionEnabled = false } } } // Creating custom classes for each subview for inspection purposes private class BackgroundView: Subview { } private class ShadowView: Subview { } var animatesStateChanges: Bool = false private(set) lazy var backgroundView: UIView = BackgroundView(frame: bounds) private(set) lazy var shadowView: UIView = ShadowView(frame: bounds) private var originalTintColor: UIColor! private var stateValueContainers: [PartialKeyPath