26 lines
572 B
Swift
26 lines
572 B
Swift
//
|
|
// StatusCollapseButton.swift
|
|
// Tusker
|
|
//
|
|
// Created by Shadowfacts on 11/3/20.
|
|
// Copyright © 2020 Shadowfacts. All rights reserved.
|
|
//
|
|
|
|
import UIKit
|
|
|
|
class StatusCollapseButton: UIButton {
|
|
|
|
private var interactionBounds: CGRect!
|
|
|
|
override func layoutSubviews() {
|
|
super.layoutSubviews()
|
|
|
|
interactionBounds = bounds.inset(by: UIEdgeInsets(top: -8, left: 0, bottom: 0, right: 0))
|
|
}
|
|
|
|
override func point(inside point: CGPoint, with event: UIEvent?) -> Bool {
|
|
return interactionBounds.contains(point)
|
|
}
|
|
|
|
}
|