I got my table view on top of a map view. I want to show to user that the tableView is scrollable. Here is my previos thread: Swift - How to attach bar to the top of table view?
I tried using
self.tableView.flashScrollIndicators()
in my ViewDidLoad() method but this doesn't change anything, the table view looks exactly the same as before. I read suggestion that it might be caused by reloading tableView and filling it with data, whilst created tableView is empty. Nonetheless I tried pasting the flashScrollIndicators() method in other project where table is created with cells immediately - again no significant difference.
Am I doing something wrong or using the method in wrong place?
If anyone is still fighting with this problem here is my working solution - works on iOS 11. In my case flashScrollIndicators()
did not work on first invocation of viewDidAppear(animated:)
. Invoking flashScrollIndicators()
with a delay will do the trick.
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
DispatchQueue.main.asyncAfter(deadline: (.now() + .milliseconds(500))) {
self.collectionView.flashScrollIndicators()
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With