How to change data from a raster field to UIImage?

Discussion created by nicholasleung on Nov 1, 2010
Latest reply on Nov 1, 2010 by nicholasleung
AGSGraphic *resultGraphic = self.identifyResult.feature;
NSData *imageData = (NSData *)[resultGraphic.attributes objectForKey:@"imageObject"]; 
UIImage *image = [UIImage imageWithData:imageData];

I have tried something like the code above but no luck so far. Does anyone has a solution for this? Many thanks!