I've got a use case where those indicators disturb the user interaction. Can I subclass and override a method or do something similar to remove the scroll indicators from the scroll view?
7 Answers
Set the showsHorizontalScrollIndicator
and showsVerticalScrollIndicator
properties of the UIScrollView
to NO
.
[tableView setShowsHorizontalScrollIndicator:NO];
[tableView setShowsVerticalScrollIndicator:NO];

- 9,564
- 146
- 81
- 122

- 4,478
- 1
- 22
- 14
-
As learnt from Docs,you can even use it for scrollview directly! [scrollview setShowsHorizontalScrollIndicator:NO]; Thanks to @retainCount – Rajal Jan 22 '15 at 07:17
-
1As of iOS 11, this should be called in viewWillAppear, it doesn't work if called in viewDidLoad – melvinto Mar 08 '18 at 17:38
//For UITableView - Objective-C
tbl.showsHorizontalScrollIndicator = NO;
tbl.showsVerticalScrollIndicator = NO;
//For UITableView - SWIFT 3.0
tbl.showsHorizontalScrollIndicator = false
tbl.showsVerticalScrollIndicator = false
//For UIScrollView - Objective-C
scrl.showsHorizontalScrollIndicator = NO;
scrl.showsVerticalScrollIndicator = NO;
//For UIScrollView - SWIFT
scrl.showsHorizontalScrollIndicator = false
scrl.showsVerticalScrollIndicator = false
Change from XIB or storyboard

- 3,626
- 1
- 27
- 42
-
tableView also has checkboxes for this - I'm working with xCode 11 – Andy Weinstein Jul 08 '20 at 14:10
For those looking to do this in Swift.
self.tableView.showsHorizontalScrollIndicator = false
self.tableView.showsVerticalScrollIndicator = false

- 1,562
- 2
- 13
- 23
For UIScrollView in Swift
scrollView?.showsHorizontalScrollIndicator = false
scrollView?.showsVerticalScrollIndicator = false

- 1,264
- 1
- 19
- 20
Swift 3.0
extension for UIScrollView
and UITableView
:
import Foundation
extension UIScrollView {
func hideIndicators() {
showsHorizontalScrollIndicator = false
showsVerticalScrollIndicator = false
}
}

- 705
- 4
- 15

- 3,785
- 1
- 30
- 44
These are your UITableView
scrolling properties:
[YourTableView setShowsHorizontalScrollIndicator:NO];
[YourTableView setShowsVerticalScrollIndicator:NO];
These are your UIScrollView
scrolling properties:
[YourScroll setShowsHorizontalScrollIndicator:NO];
[YourScroll setShowsVerticalScrollIndicator:NO];

- 9,139
- 16
- 78
- 130

- 3,323
- 1
- 29
- 31
No answers have worked for me because the focus ring of indicators is shown every time but I solve my problem via NSStoryboard
.
NSCollectionView have a diagram;
Scroll View - Collection View then Clip View then Scroller (vertical) & Scroller (Horizontal)
Click any Scroller object then in Attributes Inspector
set Focus Ring
property to None
. If you have not set it you can have a problem when users change the Appearance
between Dark
and Light
.

- 1,603
- 3
- 19
- 37