PaperFold-for-iOS
PaperFold-for-iOS copied to clipboard
Add PaperFold to a UITableViewController
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!!