CocoaPods trunk is moving to be read-only. Read more on the blog, there are 14 months to go.
| TestsTested | ✗ |
| LangLanguage | SwiftSwift |
| License | MIT |
| ReleasedLast Release | Oct 2015 |
| SPMSupports SPM | ✗ |
Maintained by Kyle Goddard.
KGFloatingDrawer is a reimplementation of JVillella/JVFloatingDrawer in Swift. A floating drawer style navigation. KGFloatingDrawer provides a unique twist on the nav drawer pattern.
func prepareDrawerViewController() -> KGDrawerViewController {
let drawerViewController = KGDrawerViewController()
drawerViewController.centerViewController = drawerSettingsViewController()
drawerViewController.leftViewController = leftViewController()
drawerViewController.rightViewController = rightViewController()
drawerViewController.backgroundImage = UIImage(named: "sky3")
_drawerViewController = drawerViewController
return drawerViewController
}KGFloatingDrawer can be installed as a CocoaPod. To install it, simply add the following line to your Podfile:
pod 'KGFloatingDrawer', '~> 0.2.0'
KGFloatingDrawer requires Swift 2.0, XCode 7.0 and CocoaPods 0.36.0
The KGDrawerViewController maintains references to center, left and optionally right view controllers. The centerViewController, leftViewController and rightViewController properties can all be reassigned in order to replace them.
KGDrawerViewController has three functions used to open and close the nav drawer.
func openDrawer(side: KGDrawerSide, animated:Bool, complete: (finished: Bool) -> Void) {}
func closeDrawer(side: KGDrawerSide, animated: Bool, complete: (finished: Bool) -> Void) {}
func toggleDrawer(side: KGDrawerSide, animated: Bool, complete: (finished: Bool) -> Void) {}The leftDrawerWidth and rightDrawerWidth are used to set the width of the drawer once it has been opened. Note that this is not the edge size of the centerViewController. The default value for this is 280 points.
The background image displayed when the drawer is open is set via the backgroundImage property.
KGFloatingDrawer comes with a spring animator with the configurable properties: animationDelay, animationDuration, initialSpringVelocity, and springDamping
But JVillella/JVFloatingDrawer has custom animators!?
I know! The ability to set a custom animator is coming soon.
Kyle Goddard
JVillella/JVFloatingDrawer was authored by Julian Villella
KGFloatingDrawer is available under the MIT license. See the LICENSE file for more info.