1
\$\begingroup\$

I convert the image into texture in a thread using the following line of code to reduce the image to texture converting time.

[[CCTextureCache sharedTextureCache] addImage:@"imageName"];

But when i retrieve this image from cache i am getting a blank image. If i am calling the above line of code in main thread i am getting the image.

\$\endgroup\$
1
\$\begingroup\$

There is function in - (void)addImageAsync:(NSString *)filename target:(id)target selector:(SEL)selector I suggest you either use this function or try reading how this function is using thread.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.