I’m making a tweak (that displays some images from web) for ios and i’m trying to use NSOperationQueue.
First i ran some code on the main thread to see how it looks like. It lasted ±5secs to show each image (UI froze).
Then i tried to use NSOperationQueue to run the same code but it lasted +10secs for each image (good thing is that the UI didn’t freeze).
Any ideas? Is it just like that?
I’m making a tweak (that displays some images from web) for ios and i’m
Share
In iOS the UI updation takes place on main thread, so once you are done with the operation queue you will need to inform main thread to update UI, but in your case as you said its updated but with delay.
You will need to call
performSelectorOnMainThread:withObject:waitUntilDone:from the operation(in the end, when data is downloaded), and in this main thread’s selector you will perform UI updation.