I have a UIScrollView
in which I am placing a bunch of views as you are scrolling. it is downloading images from an api end point. The issue is that scrolling doesn't feel as smooth as it should be. I know this is because mostly something is blocking the main thread. I have searched through the whole code and commented out any UI update code, but scrolling fast is still laggy.
Any pointers on what is the best way to find which part of your code blocks the main thread?
Instruments. There's abso-freaking-lutely nothing like it. Even apple's documentation on it mentions finding high-CPU related tasks.
Personally though, I recommend the Time Profiler. Of which, an excellent tutorial may be found here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With