Search code examples
swiftuirefreshcontrol

How to hide refresh control in tableview when all data is loaded in swift 3?


Iam using UIRefreshControl() in tableview to load more data from server when user pull to refresh. How can i hide the UIRefreshControl() or make user can not pull anymore when all the data is loaded. Thank for your helping !


Solution

  • Try this. Objc C

    [self.refreshControl removeFromSuperview];
    self.refreshControl = nil;
    

    Swift

    self.refreshControl.removefromSuperview
    self.refreshControl = nil