UIRefreshControl glitching in combination with custom TableViewCell
The way I avoid the above glitch nowadays is by delaying the tableView.reloadData() call for a small amount of time:
self.tableView.refreshControl?.endRefreshing()
self.tableView.perform(#selector(self.tableView.reloadData), with: nil, afterDelay: 0.05)
Not really a fix but more of a hack in my opinion.
UIRefreshControl endRefresh jumps when used with Large Title enabled
The problem is related to layout.estimatedItemSize = CGSize(width: 20, height: 20)
When we use AutoLayout
to resize the cell, it creates a bug with UIRefreshControl
and navigation bar large title. So, if you use layout.estimatedItemSize
with an equal or greater size than we expected. So the bug will not happen and the glitch will not happen.
Basically, the problem is when we call updateData
but the cell is bigger than we expect and each cell of the UICollectinView
will resize to a bigger size then the UICollectionViewController
will glitches.
Header Displaced in TableView with UIRefreshControl
This could be an issue due to the fact that you are adding _refreshControl
as a subview which is not supposed to be done. However you can create a UITableViewController
object add it as the child view controller of your current viewcontroller class.
For eg:-
UITableViewController *tableViewController = [[UITableViewController alloc] initWithStyle:UITableViewStylePlain];
[self addChildViewController:tableViewController];
tableViewController.refreshControl = [[UIRefreshControl alloc] init];
[tableViewController.refreshControl addTarget:self action:@selector(refresh:) forControlEvents:UIControlEventValueChanged];
tableViewController.tableView.frame = CGRectMake(...);//set the frame here
[self.view addSubview:tableViewController.tableView];
Related Topics
Preload a Scene to Prevent Lag
Generic Return Type Based on Class
Spritekit Skscene Not Resizing Correctly to Fit iPhone 12
Convert Gregorian Date to Hijri Date
Nsundomanager: Capturing Reference Types Possible
Data Structure for Fast Lookup with Multiple Criteria
Swift: How to Update UI When Listening to a Stream
Closure (With Default Value) as Function Parameter
Why Is a Firestore Listener Returning .Added Twice When a Single Document Is Added
Change The 2Nd and 3Rd Pickerview Acording to What Row from The 1St Picker Is Selected
Cloudkit: How to Access Main User's Attributes
Why Run Loop Is Needed When Using Dispatchqueue.Main.Async in MAC Command Line Tool in Swift
Swiftui Sheet Shows Sheet with Wrong Data
Can't Unwrap Optional.None When Setting Window Background Color
Where to Place Code for Audio Playback in a Swiftui App
Swift 3/iOS 10/Todayextension - Userdefaults Always Returns Nil