Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions PaperFoldMenuController/PaperFoldMenuController.m
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,21 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
}
}

//Just all this action to open or close paperFold
- (void) toggleMenu {
NSInteger position = self.paperFoldView.contentView.frame.origin.x;
if(position == 0){
[self showMenu:YES animated:YES];
} else if( position >= self.menuWidth ){
[self showMenu:NO animated:YES];
}
}

- (void)showMenu:(BOOL)show animated:(BOOL)animated
{
//Force to hide keyboard
[[[UIApplication sharedApplication] keyWindow] endEditing:YES];

if (show)
{
[self.paperFoldView setPaperFoldState:PaperFoldStateLeftUnfolded animated:animated];
Expand Down