Hi, What is stored in the "cover" object?
If it's the name of a file that is bundled with the app, you can use cell.coverAuthor.image = [UIImage imageNamed:[[data objectAtIndex:index] objectForKey:@"cover"]]; If it's the name of a file stored on "disk" some place (e.g., the Application Support directory) you'll need to build up a string with the complete path for it using something like NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES). Then pass that full path to [UIImage imageWithContentsOfFile:]. If it's an NSData object containing the actual image, you could use [UIImage imageWithData:[[data objectAtIndex:index] objectForKey:@"cover"]]; wp On Jul 1, 2011, at 1:55 PM, Fernando Aureliano wrote: > Hi, > > I'm reading data from an plist, and I'm having problems for get the image. > > The code for text look like this: > > cell.auhorLabel.text = [[data objectAtIndex:index] objectForKey:@"author"]; > > Works fine. > > > The code to get a image em put in uiimageview look like this: > > cell.coverAuthor.image = [UIImage imageWithContentsOfFile:[data > objectAtIndex:index] objectForKey:@"cover"]; > > > yeah, I know, this last line is strange. > > How is the right way? > > > Thanks! > > > -- > *Fernando Aureliano* > _______________________________________________ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > Please do not post admin requests or moderator comments to the list. > Contact the moderators at cocoa-dev-admins(at)lists.apple.com > > Help/Unsubscribe/Update your Subscription: > http://lists.apple.com/mailman/options/cocoa-dev/wpackard%40mac.com > > This email sent to wpack...@mac.com _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com