Tusker/Tusker/Views/Status/StatusCollapseButton.swift
Shadowfacts 348c306858
Add tapping CW to expand/collapse status
Expand status collapse button tap area to cover stack view spacing
2020-11-03 15:58:08 -05:00

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)
}
}