Skip to content

Commit 9e28dcb

Browse files
committed
Update README.md
1 parent 7a6dcf2 commit 9e28dcb

File tree

2 files changed

+30
-4
lines changed

2 files changed

+30
-4
lines changed

README.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,16 @@ iOS Slide Menu built on top of UINavigationController, with configurable buttons
1111

1212
![alt tag](https://raw.github.com/aryaxt/iOS-Slide-Menu/master/slideMenuAnimation.gif)
1313

14+
Version 1.4.0 Notes
15+
---------
16+
```switchToViewController:withCompletion:``` method has been deprecated. In order to get the exact same behavior use ```popToRootAndSwitchToViewController:withCompletion```
17+
18+
New features:
19+
- Allows limiting pan gesture to the sides of the view
20+
- Allows turning shadow on/off
21+
- Allows turning slide-out animation on/off when switching between viewControllers
22+
- Minor bug fixes
23+
1424
Version 1.3.0 Notes
1525
---------
1626
If you are updating from previous versions you'll get compile errors, due to changes to RevealAnimations.
@@ -75,6 +85,12 @@ This can be usefull when you have a menu item, and when the user selects an alre
7585
When set to YES user can swipe to open the menu
7686

7787
When set to NO swipe is disabled, and use can only open the menu using the UIBarButtonItem added to the navigationBar
88+
######panGestureSideOffset
89+
This property allows you to limit the gesture to the sides of the view. For instance setting this value to 50 means touches are limited to 50 pixels to the right and 50 pixels to the left of the view. This could be useful if you are expecting slide-to-delete functionality on UITableViews.
90+
91+
Default value of panGestureSideOffset is set to 0. Setting panGestureSideOffset to 0 means touches are detected in the whole view if enableSwipeGesture is set to true.
92+
###### enableShadow
93+
A boolean that allows you to turn shadow on/off. On default shadow is set to true
7894
###### rightMenu
7995
The viewController of the right menu in the navigationController
8096
###### leftMenu
@@ -108,7 +124,19 @@ Public Methods
108124
Returns the singleton instance of SlideNavigationController
109125

110126
###### - (void)switchToViewController:(UIViewController *)viewController withCompletion:(void (^)())completion;
111-
Pops to root ViewController, then pushes the new ViewController and finally calls the completion
127+
This method is deprecated
128+
129+
###### - (void)popToRootAndSwitchToViewController:(UIViewController *)viewController withCompletion:(void (^)())completion;
130+
Pops to root view controller and calls the completion.
131+
132+
###### - (void)popToRootAndSwitchToViewController:(UIViewController *)viewController withSlideOutAnimation:(BOOL)slideOutAnimation andCompletion:(void (^)())completion;
133+
Similar to previous method, but allows turning on/off slide-out-animation during the switch
134+
135+
###### - (void)popAllAndSwitchToViewController:(UIViewController *)viewController withCompletion:(void (^)())completion;
136+
Replaces the ViewController stack with a new stack that includes the new ViewController, and calls completion
137+
138+
###### - (void)popAllAndSwitchToViewController:(UIViewController *)viewController withSlideOutAnimation:(BOOL)slideOutAnimation andCompletion:(void (^)())completion;
139+
Similar to previous method, but allows turning on/off slide-out-animation during the switch
112140

113141
###### - (void)openMenu:(Menu)menu withCompletion:(void (^)())completion;
114142
Opens a given menu and calls the completion block oppon animation completion

SlideMenu/Source/SlideNavigationController.m

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,7 @@ - (id)initWithRootViewController:(UIViewController *)rootViewController
9696
- (void)setup
9797
{
9898
if (singletonInstance)
99-
@throw ([NSException exceptionWithName:@"InvalidInitialization"
100-
reason:@"Singleton instance already exists. You can only instantiate one instance of SlideNavigationController"
101-
userInfo:@{@"instance" : singletonInstance}]);
99+
NSLog(@"Singleton instance already exists. You can only instantiate one instance of SlideNavigationController. This could cause major issues");
102100

103101
singletonInstance = self;
104102

0 commit comments

Comments
 (0)