Skip to content

Commit

Permalink
Adapt the demo to show the backView below the background view
Browse files Browse the repository at this point in the history
  • Loading branch information
rhult committed Sep 30, 2012
1 parent 7a8ac6f commit 4a42dbf
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions ZKRevealingTableViewCell/ZKRevealingTableViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ - (void)viewDidLoad
// Do any additional setup after loading the view, typically from a nib.
self.objects = [NSArray arrayWithObjects:@"Right", @"Left", @"Both", @"None", nil];
self.tableView = (UITableView *)self.view;
self.tableView.backgroundColor = [UIColor clearColor];
self.tableView.rowHeight = 52.0f;
self.tableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine;
}
Expand Down Expand Up @@ -135,8 +136,12 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
cell = [[ZKRevealingTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"Cell"];
cell.delegate = self;
cell.selectionStyle = UITableViewCellSelectionStyleNone;

cell.backView.backgroundColor = [UIColor scrollViewTexturedBackgroundColor];

cell.backgroundView = [[UIView alloc] initWithFrame:CGRectZero];

cell.backView = [[UIView alloc] initWithFrame:CGRectZero];
cell.backView.backgroundColor = [UIColor scrollViewTexturedBackgroundColor];

cell.pixelsToReveal = 40;
}

Expand Down Expand Up @@ -165,9 +170,9 @@ - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)ce
{
NSUInteger row = [indexPath row];
if (row % 2 == 0) {
cell.backgroundColor = [UIColor whiteColor];
cell.backgroundView.backgroundColor = [UIColor whiteColor];
} else {
cell.backgroundColor = [UIColor colorWithRed:0.892 green:0.893 blue:0.892 alpha:1.0];
cell.backgroundView.backgroundColor = [UIColor colorWithRed:0.892 green:0.893 blue:0.892 alpha:1.0];
}

// cell.contentView.backgroundColor = cell.backgroundColor;
Expand Down

0 comments on commit 4a42dbf

Please sign in to comment.