如何从iPhone中的表视图中获取所选单元格的单元格值

问题描述:

在表视图控制器中显示图像,其中图像从URL呈现为XML文件。它适用于将图像列为滚动视图。现在我想选择一个特定的图像,窗口应该单独显示所选的单元格图像。为此,我需要获得Cell值。如果是这样,我怎样才能获得特定的单元格值并在下一个窗口中将其对应的图像显示为集合视图。

Am displaying images in a table view controller where the images are rendered from the URL as XML file. It works well with listing images as scroll view. Now i want to select a particular image and the window should show the selected Cell images alone. For this do i need to get the Cell value. If so how can i get the particular cell value and display its corresponding images as a collection view in next window.

请提示我一个想法。为了更好地理解我在图像下方粘贴了我的故事板当前的外观以及我需要输出的方式。

Kindly suggest me an idea. For your better understanding i pasted below an image how my storyboard currently looks and how i need an output.

希望你理解我的问题。

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
// here we get the cell from the selected row.
          UITableViewCell *selectedCell=[tableView cellForRowAtIndexPath:indexPath]; 

// perform required operation
         UIImage * image =selectedCell.image;

// use the image in the next window using view controller instance of that view.
}