Skip to content

PaperFold an UITableViewCell #67

@JeanetteMueller

Description

@JeanetteMueller

Hi,
i want to use paperfold on a cell, but if i do so, i cant scroll the table.
what's the best way to check draging and swiping?

my code:

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{

NSString *cellIdentifier = @"Cell";

UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier forIndexPath:indexPath];

PaperFoldView *pv = [[PaperFoldView alloc] initWithFrame:CGRectMake(0, 0, 320, 90)];
[pv setEnableBottomFoldDragging:NO];
[pv setEnableTopFoldDragging:NO];
pv.delegate = self;

UIImageView *leftV = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 60, 90)];
leftV.image = [UIImage imageNamed:@"icon_directory_comedy.png"];
leftV.contentMode = UIViewContentModeCenter;
leftV.backgroundColor = [UIColor redColor];


UILabel *rightV = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 60, 90)];
rightV.backgroundColor = [UIColor blueColor];
rightV.text = @"favourite";

[pv setLeftFoldContentView:leftV foldCount:1 pullFactor:0.9];
[pv setRightFoldContentView:rightV foldCount:1 pullFactor:0.9];

[pv setCenterContentView:cell.contentView];

//[cell.contentView removeFromSuperview];

[cell addSubview:pv];

[self configureCell:cell atIndexPath:indexPath];

return cell;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions