How to Fix: UIRefreshControl - beginRefreshing not working when UITableViewController is inside UINavigationController
UIRefreshControl not working when programmatically invoked in UITableViewController inside UINavigationController.
To solve this issue, you need to ensure that the view controller is not being pushed onto a navigation stack when using a UIRefreshControl. This can be achieved by setting the refresh control's delegate to self and then manually calling beginRefreshing.
🔧 Solution
- Set the refresh control's delegate to self:
Example Code:
- Set the refresh control's delegate to self:
[self.refreshControl setDelegate:self, delegatePriority:1000];
- Manually call beginRefreshing when needed:
Example Code:
- Manually call beginRefreshing when needed:
[self.refreshControl beginRefreshing];
By following these steps, you should be able to successfully animate the UIRefreshControl and show the spinner.
❓ Frequently Asked Questions
🛠️ Related Fixes
How to Fix: Pc crashes shortly after launching game (rainbow
Pc crashes shortly after launching game, possible cause: outdated grap
How to Fix: Installing an APK on a locked down phone
Installing an APK on a locked down phone: Try using a rooted device, e
How to Fix: FPS drops
FPS drops in games can be caused by high system resource usage, outdat