DebugHead is a library that arranges buttons that display the debug menu on the screen. You can also move the button by dragging it. You can also add menu functions yourself.
To run the example project, clone the repo, and run pod install
from the Example directory first.
Specify the class of the menu you want to display first. DebugHead is displayed when prepare is called.
Please do not call in production environment.
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
DebugHead.sharedInstance.prepare(menuClasses: [DebugMenuExit.self, DebugMenuHideDebugHead.self/*, and your plugins */])
}
You can create menus by conforming to the DebugMenu protocol.
public class DebugMenuFoo: DebugMenu {
public static let debugMenuTitle = "Title"
public static let debugMenuDangerLevel = DebugMenuDangerLevel.[None or Low or High or Extreme]
public static let debugMenuAccessoryType = UITableViewCellAccessoryType.None
public static func debugMenuSelected(debugHead: UIView, debugMenuTableViewController: UITableViewController) -> UIViewController? {
// Do something
return nil // If return a UIViewController instance, it will show.
}
}
- You can remove the head with force touch.
- DebugMenuHideDebugHead
- DebugMenuExit
DebugHead is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "DebugHead"
- Tomoya Hirano, cromteria@gmail.com
- Koji Murata, malt.koji@gmail.com
DebugHead is available under the MIT license. See the LICENSE file for more info.