Shradha Shradha - 1 year ago 249
Swift Question

Show scrollbar in UITableView before the table is dragged down. In a Way, the UIScrollBar should always be visible

In a I am using several UITableView in my app. Some of them contain several rows, while some have two three only. What I need is: if the table contains several rows, then the scrollbar should be visible before the user even drags the table down.
Or in another way, is it possible to make scrollbar visible always??

Answer Source

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


override func viewDidAppear(animated: Bool) {
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download