Show scrollbar in UITableView before the table is dragged down. In a Way, the UIScrollBar should always be visible
You can flash them but there isn't an option to make them always visible:
[ScrollView flashScrollIndicators];
UITableView is a subclass of UIScrollView,So you can use it directly with it
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
[self.tableView performSelector:@selector(flashScrollIndicators) withObject:nil afterDelay:0];
}
Check out for more info : UIScrollView - showing the scroll bar
Swift:
override func viewDidAppear(animated: Bool) {
super.viewDidAppear(animated)
self.tableView.flashScrollIndicators()
}
Swift 3.0
1) Timer
var timerForShowScrollIndicator: Timer?
2) Methods
/// Show always scroll indicator in table view
func showScrollIndicatorsInContacts() {
UIView.animate(withDuration: 0.001) {
self.tableView.flashScrollIndicators()
}
}
/// Start timer for always show scroll indicator in table view
func startTimerForShowScrollIndicator() {
self.timerForShowScrollIndicator = Timer.scheduledTimer(timeInterval: 0.3, target: self, selector: #selector(self.showScrollIndicatorsInContacts), userInfo: nil, repeats: true)
}
/// Stop timer for always show scroll indicator in table view
func stopTimerForShowScrollIndicator() {
self.timerForShowScrollIndicator?.invalidate()
self.timerForShowScrollIndicator = nil
}
3) Use
startTimerForShowScrollIndicator in viewDidAppear
stopTimerForShowScrollIndicator in viewDidDisappear