Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Tracks the paper fold state and updates accordingly + A bug fix to a bug I introduced. #4

Merged
merged 2 commits into from

2 participants

@lxcid
  • Tracks the paper fold state and turn the scrollsToTop accordingly so that it does not compete with other scroll view when it is in default state.
  • Fixed a minor bug I introduced where initWithNibName:bundle: does not pass down the parameters it gotten.
lxcid added some commits
@lxcid lxcid Fixed a minor bug I introduced where initWithNibName:bundle: does not…
… pass down the parameters it gotten.
3fdbe70
@lxcid lxcid Tracks the paper fold state and turn the scrollsToTop accordingly so …
…that it does not compete with other scroll view when it is in default state.
bfc096f
@honcheng honcheng merged commit a448d9e into honcheng:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 19, 2012
  1. @lxcid

    Fixed a minor bug I introduced where initWithNibName:bundle: does not…

    lxcid authored
    … pass down the parameters it gotten.
Commits on Nov 20, 2012
  1. @lxcid

    Tracks the paper fold state and turn the scrollsToTop accordingly so …

    lxcid authored
    …that it does not compete with other scroll view when it is in default state.
This page is out of date. Refresh to see the latest.
2  PaperFoldMenuController/PaperFold
@@ -1 +1 @@
-Subproject commit 0f9167e363f62c3af6ef4a923051f922ce7ef2f5
+Subproject commit 6ac4659fb7d6804ad4ada7197b474ecae533c633
View
12 PaperFoldMenuController/PaperFoldMenuController.m
@@ -172,8 +172,8 @@ - (id)initWithMenuWidth:(float)menuWidth numberOfFolds:(int)numberOfFolds
return self;
}
-- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
- self = [super initWithNibName:nil bundle:nil];
+- (id)initWithNibName:(NSString *)theNibNameOrNil bundle:(NSBundle *)theNibBundleOrNil {
+ self = [super initWithNibName:theNibNameOrNil bundle:theNibBundleOrNil];
if (self)
{
[self commonInit];
@@ -210,6 +210,7 @@ - (void)viewDidLoad
[self.paperFoldView setLeftFoldContentView:menuTableView foldCount:self.numberOfFolds pullFactor:0.9];
[menuTableView setDelegate:self];
[menuTableView setDataSource:self];
+ menuTableView.scrollsToTop = !(self.paperFoldView.state == PaperFoldStateDefault);
self.menuTableView = menuTableView;
ShadowView *menuTableViewSideShadowView = [[ShadowView alloc] initWithFrame:CGRectMake(_menuTableView.frame.size.width-3,0,3,[self.view bounds].size.height) foldDirection:FoldDirectionHorizontalLeftToRight];
@@ -322,4 +323,11 @@ - (void)showMenu:(BOOL)show animated:(BOOL)animated
}
}
+#pragma mark - PaperFoldViewDelegate methods
+
+- (void)paperFoldView:(id)thePaperFoldView didFoldAutomatically:(BOOL)theAutomated toState:(PaperFoldState)thePaperFoldState {
+ BOOL thePaperFoldViewDidFold = (thePaperFoldState == PaperFoldStateDefault);
+ self.menuTableView.scrollsToTop = !thePaperFoldViewDidFold;
+}
+
@end
Something went wrong with that request. Please try again.