Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PaperFold to a UITableViewController #52

Open
johntiror opened this issue Feb 26, 2013 · 0 comments
Open

Add PaperFold to a UITableViewController #52

johntiror opened this issue Feb 26, 2013 · 0 comments

Comments

@johntiror
Copy link

Hi, I want to add PaperFold to my existing app. I want to add it in a UITableViewController.

in the .h file I added this code:

@interface TableViewPreview : UITableViewController<MKMapViewDelegate, PaperFoldViewDelegate>
@property (nonatomic, strong) PaperFoldView *paperFoldView;
@property (nonatomic, strong) MKMapView *mapView;
@property (nonatomic, strong) UITableView *leftTableView, *centerTableView;
@property (nonatomic, strong) UIView *topView, *bottomView;
@end

and in the .m file

- (id)initWithStyle:(UITableViewStyle)style
{
    self = [super initWithStyle:style];
    if (self) {
        _paperFoldView = [[PaperFoldView alloc] initWithFrame:CGRectMake(0,0,[self.view bounds].size.width,[self.view bounds].size.height)];
        [_paperFoldView setAutoresizingMask:UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleWidth];
        [self.view addSubview:_paperFoldView];

        _mapView = [[MKMapView alloc] initWithFrame:CGRectMake(0,0,240,[self.view bounds].size.height)];
        [_paperFoldView setRightFoldContentView:_mapView foldCount:3 pullFactor:0.9];

        [_paperFoldView setCenterContentView:self.tableView];

    }
    return self;
}

but nothing is happening (the code compile and everything is running, but I can't slide). What am I doing wrong?
Thanks a lot for your help!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant