I'm having a table view where the cells are the size of the screen. I'm using the paging system. I also have a view at the top of the table view.
When I scroll the first time it scrolls well from the first element (the top UIView) to the next element (the first cell), then I'm scrolling to the next one and everything works well. BUT when I'm scrolling back, it only scrolls back half way (the exact size of the top UIView).
Not sure what I'm doing wrong here. Basically the paging system doesn't scroll the right height.
Edit : here's part of my code that might be relevant
// Enabling the paging system
- (void)viewDidLoad
{
[super viewDidLoad];
self.tableView.pagingEnabled = YES;
}
// Setting the height of a cell
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
return [[UIScreen mainScreen] bounds].size.height;
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.