Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 02-18-2009, 09:07 PM   #8 (permalink)
krye
Registered Member
 
krye's Avatar
 
Join Date: Jan 2009
Location: NY, USA
Posts: 359
krye is on a distinguished road
Default

I'm working on a similar problem. My object contains a name, a description, and an image. I would like to load an image into a UIImageView based on what was selected in the table row from the previous view. How do I load that? I can get everything to display, but the image. The name of the row appears in the nav bar, the description appears in the UILabel, but the image does not appear in the UIImageView.

The array entries look like this:
Fruit *fruit1 = [[Fruit alloc] initWithName:@"banana" description:@"This is a banana" picture:@"banana.png"];


My view is populated like this:

[self.navigationController pushViewController:self.fruitView animated:YES];
//put fruit name in the nav bar
self.fruitView.title = [fruit name];

//put fruit description into the label on the view
[self.fruitView.fruitDescription setText:[fruit description]];

I tried all these and nothing works:
//put the image into the UIImageView
[self.fruitView setImage:[fruit picture]];
self.fruitView.picture = [fruit picture];
[self.fruitView.picture setImage:[fruit picture]];
self.fruitView.image = [fruit picture];

Please help. Thanks.
krye is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 175,634
Threads: 94,093
Posts: 402,792
Top Poster: BrianSlick (7,990)
Welcome to our newest member, nyoe
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 08:52 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.