Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Toggle FLEX explorer with multi touch
//
// UIWindow+FLEX.swift
//
// Created by Lex on 11/6/15.
// Copyright © 2015 lexrus.com. All rights reserved.
//
import UIKit
#if DEBUG
import FLEX
#endif
class LTWindow : UIWindow {
#if DEBUG
override func sendEvent(event: UIEvent) {
super.sendEvent(event)
if (event.allTouches()?.filter { $0.phase == .Began })?.count < 2 {
return
}
if FLEXManager.sharedManager().isHidden {
FLEXManager.sharedManager().showExplorer()
} else {
FLEXManager.sharedManager().hideExplorer()
}
}
#endif
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.