Czy istnieje sposób na ukrycie wskaźników przewijania w widoku UIScrollView?
Mam przypadek użycia, w którym te wskaźniki zakłócają interakcję użytkownika. Czy Mogę podklasować i nadpisać metodę lub zrobić coś podobnego, aby usunąć wskaźniki przewijania z widoku przewijania?
109
6 answers
Ustaw showsHorizontalScrollIndicator
i showsVerticalScrollIndicator
właściwości UIScrollView
na NO
.
[tableView setShowsHorizontalScrollIndicator:NO];
[tableView setShowsVerticalScrollIndicator:NO];
241
Author: retainCount,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2018-02-15 06:58:24
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2018-02-15 06:58:24
//Dla UITableView-Objective-C
tbl.showsHorizontalScrollIndicator = NO;
tbl.showsVerticalScrollIndicator = NO;
//dla UITableView-SWIFT 3.0
tbl.showsHorizontalScrollIndicator = false
tbl.showsVerticalScrollIndicator = false
//Dla UIScrollView-Objective-C
scrl.showsHorizontalScrollIndicator = NO;
scrl.showsVerticalScrollIndicator = NO;
//dla UIScrollView-SWIFT
scrl.showsHorizontalScrollIndicator = false
scrl.showsVerticalScrollIndicator = false
Zmiana z XIB lub storyboard
39
Author: Bhavesh Nayi,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2018-05-28 13:38:12
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2018-05-28 13:38:12
Dla tych, którzy chcą to zrobić w Swift.
self.tableView.showsHorizontalScrollIndicator = false
self.tableView.showsVerticalScrollIndicator = false
13
Author: davidrayowens,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2014-09-01 06:15:00
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2014-09-01 06:15:00
Dla UIScrollView w języku Swift
scrollView?.showsHorizontalScrollIndicator = false
scrollView?.showsVerticalScrollIndicator = false
8
Author: mattyU,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2015-06-02 16:45:17
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2015-06-02 16:45:17
Oto twoje UITableView
właściwości przewijania:
[YourTableView setShowsHorizontalScrollIndicator:NO];
[YourTableView setShowsVerticalScrollIndicator:NO];
Oto twoje UIScrollView
właściwości przewijania:
[YourScroll setShowsHorizontalScrollIndicator:NO];
[YourScroll setShowsVerticalScrollIndicator:NO];
4
Author: Darshan Kunjadiya,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2015-05-10 11:29:10
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2015-05-10 11:29:10
Rozszerzenie Swift 3 dla UIScrollView i UITableView:
import Foundation
extension UIScrollView {
func hideIndicators() {
showsHorizontalScrollIndicator = false
showsVerticalScrollIndicator = false
}
}
1
Author: Roman Barzyczak,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2017-04-24 07:23:15
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2017-04-24 07:23:15