Hi there,
I am new to iphone dev and SDK. I am currently developing a navgation based app with multiple views just to practice and I am trying to figure out if I can change the image in the UIImageView depending on what the user chooses in the UITableView. For example say it is a flower app...the user would click on "Rose" in the table and an image of a Rose would transition onto the screen, or if they clicked on "Lily" and and image of a Lilly would show up, etc...
I would potentially need to do this for hundreds of different entries. I currently have information stored on a plist about each entry. Is there any way that I can store an image in the plist. If not what is the best way to store images? Also how would i access them in the app so that each image appeared when it was called by the user in the table view.
Hi there,
I am new to iphone dev and SDK. I am currently developing a navgation based app with multiple views just to practice and I am trying to figure out if I can change the image in the UIImageView depending on what the user chooses in the UITableView. For example say it is a flower app...the user would click on "Rose" in the table and an image of a Rose would transition onto the screen, or if they clicked on "Lily" and and image of a Lilly would show up, etc...
I would potentially need to do this for hundreds of different entries. I currently have information stored on a plist about each entry. Is there any way that I can store an image in the plist. If not what is the best way to store images? Also how would i access them in the app so that each image appeared when it was called by the user in the table view.
You can just store the names of the images in the plist, then load them up with imageNamed.
You shouldn't try to get the name from the UITableViewCell, as iSDK suggests - the convention is that a table just displays data, it shouldn't be the source of the data.
You can just store the names of the images in the plist, then load them up with imageNamed.
You shouldn't try to get the name from the UITableViewCell, as iSDK suggests - the convention is that a table just displays data, it shouldn't be the source of the data.
Thanks, I ended up the imageNamed method and it worked fine.