I am looking to preload a number of images using performSelectorInBackground:withObject: I have two questions …
-
I am aware that you not supposed to do anything UIKit related in the
background but can I instanciate UIImage objects and add them to a
mutable-array. -
Is it possible to safely access the iVars (the mutable-array above) in the calling object from within the selector running on the background thread.
yes you can create/load images to the Mutable array and that of 2nd part, you may also access the ivars of class in background thread, you don’t need to use main thread if that is not UIKit’s data like imageview etc. but if it is, you can use