From the limited information you gave, I assume that you create a UIView (or any of it'subclass) from a thread.
Try using the following instead:
[self performSelectorOnMainThread:<#(SEL)aSelector#>
withObject:<#(id)arg#>
waitUntilDone:<#(BOOL)wait#>];
== edit ==
If that's your appDelegate which gets the callback from the thread, try adding a new method besides your callback:
- (void) setMyImage:(UIImage*)theImage {
...
myUIImageView.image = theImage;
...
}
and call this from
the thread as mentioned above:
- (void) callBackWithImage:(UIImage*)imageFromUrl {
[self performSelectorOnMainThread:@selector(setMyImage:)
withObject:imageFromUrl
waitUntilDone:NO];
}