UITableView custom scrollbar

How to create a custom scrollbar for a UITableView?

I want to remove the default one that appears when tracking starts, and disappears when tracking ends. Instead, I want the computer program to be the same: (a) it is on the right side of the screen and is always visible; (b) manually scrolling the bar scrolls the UITableView to the appropriate position; (c) Scrolling A UITableView will scroll the scroll bar accordingly (without the default display provided by Apple).

The difficulty in (b) and (c) is that, as far as I know, Apple provides only ways to scroll to a specific line / section, but not to scroll up to three quarters of the way down. For example, if I want to scroll the scroll bar, the UITableView will subsequently scroll only the top of the row / cell. The method I'm talking about is:

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

Has anyone implemented a custom scrollbar in their UITableView before? Or someone can help me figure out a way to solve the following problems:

  • scrolling to any point in a UITableView instead of the start of a cell

  • remove the default scrollbar and prevent it from appearing

  • change image / scrollbar animation / no matter how UITableView scrolls

Thank!


+5
1

UITableView UIScrollView, , .

- (void) setContentOffset: (CGPoint) contentOffset : (BOOL)

. , .

,

table.showsVerticalScrollIndicator = NO;

, !

+2

All Articles