Skip to Content
Oct 22, 2020 at 10:32 AM

RefreshControl issue on tableView

221 Views Last edit Oct 22, 2020 at 10:34 AM 2 rev


I have a viewController with a tableView (not UITableViewController) and a FUINavigationBar. When adding refreshControll, the animations doesn't work like they should, e.g the NavigationBar doesn't always move back up, and the loading indicator is just blinking for a split second. When changing the NavigationBar back to UINavigationBar, it works like it should.

Any suggestions on how to fix this for FUINavigationBar? Also, any idea why the whitespace on the top is there - it came with xcode 12 I believe..

@IBOutlet weak var table: UITableView!
let refreshControl = UIRefreshControl()
refreshControl.addTarget(self, action: #selector(refresh), for: .valueChanged)
refreshControl.tintColor = .white //this is needed as it is grey/black by default
table.refreshControl = refreshControl

On a side note it seems to me that there is some custom code here, trying to mimic Apple's animation from large title to small title for example. When scrolling down on a NB with large title on UINavigationBar it transitions to small very smooth, but with FUINavigationBar, it kind of jumps from large to small.