CCKFNavDrawer is a custom navigationController implementing sliding menu on IOS, which aims to provide Android Navigation Drawer for developers to make it on IOS.
- Left BarButtonItem to open/close the Drawer
- Fast swipe to open/close the drawer
- Gesture to open/close the drawer
- Tap on Shawdow to close the drawer
- Replace your UINavigationController with CCKFNavDrawer class
- Add your IBOutlet and code in DrawerView class in order to customize the appearance of your drawer view.
- Adopt the protocol
CCKFNavDrawerDelegate
- Set setCCKFNavDrawerDelegate to your root view controller. e.g.
self.rootNav = (CCKFNavDrawer *)self.navigationController;
[self.rootNav setCCKFNavDrawerDelegate:self];
- implement the delegate method. e.g.
- (void)CCKFNavDrawerSelection:(NSInteger)selectionIndex
{
NSLog(@"%i", selectionIndex);
}
in order to get the index of selection in navigation drawer
For detail, please take a look in VC class.
- It is ios7 only.
- It is currently portrait only, I will make it landscape soon. Of couse, I welcome and appreciate someone can make it landscape compatible. FORK me if you want to make it better!