开发者

Show the complete sections of rows in my table view after scrolling is done

开发者 https://www.devze.com 2023-04-09 01:29 出处:网络
i have table view(it has sections). at a time it will show only 4 images/rows(the height of table View is set according to that). when thescrolling is done, it will display 5th row half section开发者_

i have table view(it has sections). at a time it will show only 4 images/rows(the height of table View is set according to that). when the scrolling is done, it will display 5th row half section开发者_运维技巧,6th row full, 7th row full ,8th row full , 9th row half section as usual. however i don't want to show the half section of any rows. i need to show the complete sections of rows in my table view(it may be Rows 5,6,7,8 or Rows 6,7,8,9) after my scroll function is done. is any way to do it?any property for tableView to do it?


I think you should combine next methods:

  1. scrollToRowAtIndexPath:atScrollPosition:animated:

    Scrolls the receiver until a row identified by index path is at a particular location on the screen.

    - (void)scrollToRowAtIndexPath:(NSIndexPath *)indexPath atScrollPosition:(UITableViewScrollPosition)scrollPosition animated:(BOOL)animated

  2. scrollViewDidEndDragging:willDecelerate:

    Tells the delegate when dragging ended in the scroll view.

    - (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate

  3. scrollViewDidEndDecelerating:

    Tells the delegate that the scroll view has ended decelerating the scrolling movement.

    - (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号