Reputation: 442
I load image by NSOparationInvokation and call out method in the main thread, which adds this image to scroll view, but app hardly lags. If I load image but not add it view, app works normally, if I add test button on view app also work normally and if I load image and add test button to view app don't lag. By profiler problem in __spin_lock. Someone knows what's wrong? Thanks.
Upvotes: 0
Views: 379
Reputation: 2937
When using threads on iOS, you should never ever ever make calls to UIKit
. That's why it won't load. Put it on the main thread and it'll work.
Upvotes: 3