Scrolling UICollectionView is very mutable

Scrolling on my UICollectionView is really mutable. When I scroll half the screen, it is stuck for a moment and then continues. How to make scrolling smoother using SWIFT?

+1
source share
3 answers

Use the Time Profiler tool to find out where the bottleneck is. Swift has nothing to do with scroll performance.

+1
source

There are two additional ways:

1) [Quick Method] When the intermittent effect is large enough to give you time to press the pause button in the debugger. And then look at what the main thread does (Thread 1), most likely it will not perform user interface tasks. Move this task to the background.

2) When tools with a kernel image are not used.

0
source

This help will help you put this code after dequeueReusable Cell

cell.layer.shouldRasterize = YES; cell.layer.rasterizationScale = [UIScreen mainScreen].scale; 
0
source

Source: https://habr.com/ru/post/1272991/


All Articles