Add debug menu option
Puts an option in the debug menu for toggling on/off visible touches.
This commit is contained in:
parent
12791ddf28
commit
7f58422900
|
@ -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 {
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue