Add debug menu option

Puts an option in the debug menu for toggling on/off visible touches.
This commit is contained in:
Chase Carroll 2022-12-05 10:32:10 -05:00
parent 12791ddf28
commit 7f58422900
2 changed files with 5 additions and 1 deletions

View File

@ -122,6 +122,10 @@ extension HomeTimelineViewController {
identifier: nil,
options: [],
children: [
UIAction(title: "Toggle Visible Touches", image: UIImage(systemName: "hand.tap"), attributes: []) { [weak self] action in
guard let window = UIApplication.shared.keyWindow as? TouchesVisibleWindow else { return }
window.touchesVisible = !window.touchesVisible
},
UIAction(title: "Toggle EmptyView", image: UIImage(systemName: "clear"), attributes: []) { [weak self] action in
guard let self = self else { return }
if self.emptyView.superview != nil {

View File

@ -49,7 +49,7 @@ fileprivate final class TouchView: UIView {
public final class TouchesVisibleWindow: UIWindow {
var touchesVisible = false {
public var touchesVisible = false {
didSet {
if !touchesVisible {
cleanUpAllTouches()