Comments (4)
There is currently no way to do that.
I'll add it to the list of features to add.
from ios-slide-menu.
Thanks. But for now. Can I just use the animation that was used in closing the slide menu to switchToViewController?
from ios-slide-menu.
Animations are for revealing the menu not the navigation controller.
Create a category for SlideNavigationController. Add the following method and use it for switching viewControllers. I just wrote this haven't done much testing on it. So make sure it works for your need. It'll be tested and added to the new release
- (void)switchToViewController:(UIViewController *)viewController withSlideOutAnimation:(BOOL)slideOutAnimation andCompletion:(void (^)())completion {
if (self.avoidSwitchingToSameClassViewController && [self.topViewController isKindOfClass:viewController.class])
{
[self closeMenuWithCompletion:completion];
return;
}
void (^switchAndCloseMenu)(void) = ^() {
[super popToRootViewControllerAnimated:NO];
[super pushViewController:viewController animated:NO];
[self closeMenuWithCompletion:^{
if (completion)
completion();
}];
};
if ([self isMenuOpen])
{
if (slideOutAnimation)
{
[UIView animateWithDuration:(slideOutAnimation) ? MENU_SLIDE_ANIMATION_DURATION : 0
delay:0
options:UIViewAnimationOptionCurveEaseOut
animations:^{
CGFloat width = self.horizontalSize;
CGFloat moveLocation = (self.horizontalLocation> 0) ? width : -1*width;
[self moveHorizontallyToLocation:moveLocation];
} completion:^(BOOL finished) {
switchAndCloseMenu();
}];
}
else
{
switchAndCloseMenu();
}
}
else
{
switchAndCloseMenu();
}
}
from ios-slide-menu.
Great! This seems to be working well. Thanks.
from ios-slide-menu.
Related Issues (20)
- How to set fix width in side menu for all device?
- conflict with tableview delete gesture & slide menu gesture? HOT 3
- Hi. Not support RTL? (Hebrew) HOT 1
- I have a confused about the code
- How do you close leftMenu immediately
- how can I pop to previous controller by gesture?
- Slide Menu does not work well in IOS 11 HOT 9
- Slide menu visual bug pushing and popping view controllers HOT 1
- Slide menu does not get close on tapping outside the menu on ios 11. HOT 2
- Close de menu by swiping left
- carthage version
- action sheet and image picker controller is not presenting properly on left menu.
- Sigh. Contentview size is zero
- Problem with reordering cells.
- VIewDidLoad not called
- In Swift method HOT 1
- Regarding change in layout while clicking for left menu
- The slide menu on the left, in iPadOS is not working properly HOT 12
- Can support in upperversion of OS ?
- Movement
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ios-slide-menu.