CocoaPods trunk is moving to be read-only. Read more on the blog, there are 12 months to go.
| TestsTested | ✗ |
| LangLanguage | Obj-CObjective C |
| License | MIT |
| ReleasedLast Release | Jul 2015 |
Maintained by thattyson.
A simple window presentation manager for iOS written in objective-c which takes advantage of UIWindow.
UIWindow can present any UIViewController subclass as a rootViewController. Normally an entire app is confined within a single UIWindow. This manager allows you to create many TTWindow objects with different z positions for some truly creative UI!
UIStatusBar easily!I wrote TTWindowManager before swift existed. I haven't converted it but have now fully embraced swift so I'm exclusively showing swift implementation.
TTWindowManager/TTWindowManager folder into your project.#import TTWindowManager.h to your bridging header and code away!Override the main UIWindow in your AppDelegate with a TTWindow to take full advantage of the stack.
class AppDelegate: UIResponder, UIApplicationDelegate {
// var window: UIWindow?
//Replace default with TTWindow override
var window : UIWindow? = {
let window = TTWindow()
return window
} ()
func application(application: UIApplication, willFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
//Important to ensure the window is properly sized
self.window?.frame = UIScreen.mainScreen().bounds
return true
}
}Add a shake gesture callback to display a debug console or something else app-specific
Add it to
didFinishLaunchingWithOptionsin your AppDelegate if you're overriding the default UIWindow
(self.window as! TTWindow).shakeGestureCallback = { () -> Void in
//Display something on shake
println("Shake!")
}Quickly present a new TTWindow with an animation and at a specific window level
TTWindowManager.sharedInstance().presentViewController(viewController, atWindowPosition: .Modal, withAnimation: .Modal) { (success) -> Void in
}
TTWindowPositiondetermines what z-index the TTWindow will present. These values are based aroundUIWindowLeveland will present the window above or behind native Apple components like theUIStatusBarorUIAlerts
TTWindowManager is published under the MIT license.
It has been created and developped by me (thattyson)