UIScrollView indicator always show?

2019-01-14 02:40发布

问题:

its possible to make UIScrollView indicator always show? and not only when scrolling!

Thank you.

回答1:

You can't. This is part of the interface guidelines. What you can do alternatively is flash them in some sensible circumstances (the view becomes visible, moves onto the screen, or similar) using the - (void)flashScrollIndicators method.



回答2:

You can use this custom scroll bar:
https://github.com/BasheerSience/BRScrollBar

To always show the scroll bar you just need to do this:

brScrollBar =[BRScrollBarController initForScrollView:self.tableView
                                               onPosition:kIntBRScrollBarPositionRight
                                                 delegate:self];
brScrollBar.scrollBar.hideScrollBar = NO;

The scroll bar has many features, and its draggable.