|
@@ -1,5 +1,6 @@
|
1
|
1
|
#import "RNNSideMenuSideOptions.h"
|
2
|
2
|
#import "RNNSideMenuController.h"
|
|
3
|
+#import "MMDrawerVisualState.h"
|
3
|
4
|
|
4
|
5
|
@implementation RNNSideMenuSideOptions
|
5
|
6
|
|
|
@@ -17,7 +18,7 @@
|
17
|
18
|
break;
|
18
|
19
|
}
|
19
|
20
|
}
|
20
|
|
-
|
|
21
|
+
|
21
|
22
|
if (self.visible) {
|
22
|
23
|
if (self.visible.boolValue) {
|
23
|
24
|
[sideMenuController showSideMenu:side animated:YES];
|
|
@@ -26,6 +27,24 @@
|
26
|
27
|
}
|
27
|
28
|
}
|
28
|
29
|
|
|
30
|
+ if (self.shouldStretchDrawer) {
|
|
31
|
+ sideMenuController.sideMenu.shouldStretchDrawer = self.shouldStretchDrawer.boolValue;
|
|
32
|
+ }
|
|
33
|
+
|
|
34
|
+ if (self.animationVelocity) {
|
|
35
|
+ sideMenuController.sideMenu.animationVelocity = [self.animationVelocity doubleValue];
|
|
36
|
+ }
|
|
37
|
+
|
|
38
|
+ MMDrawerControllerDrawerVisualStateBlock animationTypeStateBlock = nil;
|
|
39
|
+ if ([self.animationType isEqualToString:@"door"]) animationTypeStateBlock = [MMDrawerVisualState swingingDoorVisualStateBlock];
|
|
40
|
+ else if ([self.animationType isEqualToString:@"parallax"]) animationTypeStateBlock = [MMDrawerVisualState parallaxVisualStateBlockWithParallaxFactor:2.0];
|
|
41
|
+ else if ([self.animationType isEqualToString:@"slide"]) animationTypeStateBlock = [MMDrawerVisualState slideVisualStateBlock];
|
|
42
|
+ else if ([self.animationType isEqualToString:@"slide-and-scale"]) animationTypeStateBlock = [MMDrawerVisualState slideAndScaleVisualStateBlock];
|
|
43
|
+
|
|
44
|
+ if (animationTypeStateBlock) {
|
|
45
|
+ [sideMenuController.sideMenu setDrawerVisualStateBlock:animationTypeStateBlock];
|
|
46
|
+ }
|
|
47
|
+
|
29
|
48
|
if (self.width) {
|
30
|
49
|
switch (side) {
|
31
|
50
|
case MMDrawerSideRight:
|
|
@@ -38,7 +57,7 @@
|
38
|
57
|
}
|
39
|
58
|
}
|
40
|
59
|
}
|
41
|
|
-
|
|
60
|
+
|
42
|
61
|
[self resetOptions];
|
43
|
62
|
}
|
44
|
63
|
|