PDA

View Full Version : Displaying a image in the next view when a cell is tapped




iPhone 62S
Nov 24, 2009, 12:15 PM
How do I display a different image in the next view for different cells in a cellView? For example, I click cell one, and image one is displayed next, I hit cell two and image two shows next, etc.

I can already make it show the same image for every cell, but that's useless.

Any help from those more experienced?



icewing
Nov 24, 2009, 01:19 PM
How do I display a different image in the next view for different cells in a cellView? For example, I click cell one, and image one is displayed next, I hit cell two and image two shows next, etc.

I can already make it show the same image for every cell, but that's useless.

Any help from those more experienced?

Sorry, not exactly sure what you're asking. Are you looking for help with logic to figure out which image to show, so that you don't have to hard-code the image names?

Will there be a variable number of images? Are you trying to determine how many images are in a location, and then create and display a matching number of cells, and then automatically link to the appropriate image?

dejo
Nov 24, 2009, 02:03 PM
How do I display a different image in the next view for different cells in a cellView?
cellView? iPhone has no such thing. Do you mean UITableView?

iPhone 62S
Nov 24, 2009, 02:32 PM
Sorry, not exactly sure what you're asking. Are you looking for help with logic to figure out which image to show, so that you don't have to hard-code the image names?

Will there be a variable number of images? Are you trying to determine how many images are in a location, and then create and display a matching number of cells, and then automatically link to the appropriate image?

I'm asking for help getting it to show the image I want. I already have a system like that for the text, so the text in the cell is displayed in the next view. However, I don't want that with the images because the images on the cells are only thumbnails, and I wanted to display a larger version in the next view. So I need a system that will look at the cell being selected and display the image I set for each cell, if you what I'm trying to say.

And yes, I did mean UITableView, sorry about that!