Sideslip menu JYJSlideMenuController


GitHub address
, a different side slide menu


Sideslip menu JYJSlideMenuController
Sideslip menu JYJSlideMenuController


JYJSlideMenuController imitation Mobell sideslip navigation bar, since they are sharing the bike, why not take out the sliding menu sharing it


JYJSlideMenuController is very simple, the use of the system navigation bar, with UIBarButtonItem slowly appear effect, save custom trouble. Down, then I explain the specific implementation of the general steps:

The right side of the sideslip bar is transparent and visible below. After thinking, it feels like the window window. Set the window with the controller for the navigation controller window_.rootViewController = NAV; the whole process is still used, the system navigation bar does not need to customize

1, add gestures. The gesture is on the edge of the screen, carefully observe the v-mobile, there are gestures, use is UIScreenEdgePanGestureRecognizer, but the map, no effect. What shall I do? The solution is to implement the proxy method

- - (BOOL) gestureRecognizer: (UIGestureRecognizer *), gestureRecognizer, shouldBeRequiredToFailByGestureRecognizer: (UIGestureRecognizer *) otherGestureRecognizer
UIScreenEdgePanGestureRecognizer *leftEdgeGesture = [[UIScreenEdgePanGestureRecognizer alloc] initWithTarget:self action:@selector (moveViewWithGesture:)]; leftEdgeGesture.edges = UIRectEdgeLeft; / / the left edge of the screen in response to [self.view addGestureRecognizer:leftEdgeGesture]; / / here is the map processing, comply with the agency agreement, implementation of proxy method leftEdgeGesture.delegate = self;

2, out of the status bar after the hidden, here is very exquisite, the status bar slowly hidden.
configuration UIViewControllerBasedStatusBarAppearance in info.plist is YES.
is then implemented in the controller

- - (BOOL) prefersStatusBarHidden - - (UIStatusBarAnimation) preferredStatusBarUpdateAnimation

Animation shows hidden words that require animation

Self.hideStatusBar = YES; [UIView animateWithDuration:animationTime animations:^{[self setNeedsStatusBarAppearanceUpdate]; self.rootViewController.navigationController.navigationBar.frame = CGRectMake (0, 0, [UIScreen mainScreen].Bounds.size.width, 64);}];

Contact me

QQ 453255376, if there is bug, do not understand, I hope you will contact me enthusiastically, the procedures written better.