Skip to content
This repository has been archived by the owner on Mar 24, 2020. It is now read-only.

Commit

Permalink
Updated Advanced example project
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas Gessner committed Dec 21, 2013
1 parent 06e72af commit 1be740d
Showing 1 changed file with 1 addition and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

@interface JGTestViewController () <JGScrollableTableViewCellDelegate> {
NSIndexPath *_openedIndexPath;
BOOL _left;
}

@end
Expand All @@ -28,23 +27,11 @@ - (instancetype)initWithStyle:(UITableViewStyle)style {

[self.tableView registerClass:[JGExampleScrollableTableViewCell class] forCellReuseIdentifier:@"ScrollCell"];

UISwitch *s = [[UISwitch alloc] init];
[s addTarget:self action:@selector(switched:) forControlEvents:UIControlEventValueChanged];

self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:s];

self.title = @"Option view on the left->";
self.title = @"-> Slide to reveal side menu";
}
return self;
}


- (void)switched:(UISwitch *)sender {
_left = sender.on;
[self.tableView reloadData];
}


#pragma mark - JGScrollableTableViewCellDelegate

- (void)cellDidBeginScrolling:(JGScrollableTableViewCell *)cell {
Expand Down Expand Up @@ -87,8 +74,6 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N

[cell setGrabberVisible:((indexPath.row % 3) == 0)];

[cell setOptionView:cell.optionView side:(_left ? JGScrollableTableViewCellSideLeft : JGScrollableTableViewCellSideRight)];

cell.scrollDelegate = self;

[cell setOptionViewVisible:[_openedIndexPath isEqual:indexPath]];
Expand Down

0 comments on commit 1be740d

Please sign in to comment.