I'm facing with a simple but tedious problem. What I'm trying to do is make an UITableView to page like an UIScrollView but enabling paging doesn't help me so much because I can't set page size so the tableview scrolls exactly of its height so it shows rows 1...10 or 11...20 and so on. What I'd like instead is that no cell remains clipped above or under the view when I scroll (thus paging) without having a sort of fixed range of shown cells.
Thanks a lot
More simple and more efficient :)
- (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate{
if(decelerate) return;
[self scrollViewDidEndDecelerating:scrollView];
}
- (void)scrollViewDidEndDecelerating:(UITableView *)tableView {
[tableView scrollToRowAtIndexPath:[tableView indexPathForRowAtPoint: CGPointMake(tableView.contentOffset.x, tableView.contentOffset.y+tableView.rowHeight/2)] atScrollPosition:UITableViewScrollPositionTop animated:YES];
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With