Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

- optional left-edge dragging.

when disabled (default), the menu can be revealed by dragging any part of the content view
when enabled - menu can only be revealed by dragging from the left edge of the screen. This can be useful if users still want to keep most part of the content view for other gestures.

- use a PaperFold branch that has optional left-edge dragging
  • Loading branch information...
commit fa1a7d3c755fee4272f5157038c30acd4e6ee834 1 parent a448d9e
honcheng authored
2  Demo/Demo/DemoMenuController.m
View
@@ -26,6 +26,8 @@ - (id)initWithMenuWidth:(float)menuWidth numberOfFolds:(int)numberOfFolds
- (void)viewDidLoad {
[super viewDidLoad];
+ [self setOnlyAllowEdgeDrag:NO];
+
UIView *tableBgView = [[UIView alloc] initWithFrame:self.view.bounds];
[tableBgView setBackgroundColor:[UIColor colorWithRed:0.170 green:0.166 blue:0.175 alpha:1.000]];
[self.menuTableView setBackgroundView:tableBgView];
2  PaperFoldMenuController/PaperFold
@@ -1 +1 @@
-Subproject commit 6ac4659fb7d6804ad4ada7197b474ecae533c633
+Subproject commit 1ff5c6da965561ee38240f0a3691138abb492250
1  PaperFoldMenuController/PaperFoldMenuController.h
View
@@ -42,6 +42,7 @@
@property (nonatomic, weak) UITableView *menuTableView;
@property (nonatomic, weak) UIView *contentView;
@property (nonatomic, weak) id<PaperFoldMenuControllerDelegate> delegate;
+@property (nonatomic, assign) BOOL onlyAllowEdgeDrag;
/**
* Set and return the current view controller;
*/
5 PaperFoldMenuController/PaperFoldMenuController.m
View
@@ -323,6 +323,11 @@ - (void)showMenu:(BOOL)show animated:(BOOL)animated
}
}
+- (void)setOnlyAllowEdgeDrag:(BOOL)onlyAllowEdgeDrag
+{
+ [self.paperFoldView setEnableHorizontalEdgeDragging:onlyAllowEdgeDrag];
+}
+
#pragma mark - PaperFoldViewDelegate methods
- (void)paperFoldView:(id)thePaperFoldView didFoldAutomatically:(BOOL)theAutomated toState:(PaperFoldState)thePaperFoldState {
Please sign in to comment.
Something went wrong with that request. Please try again.