Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to get the cell value of a selected cell from Table view in iPhone

Tags:

ios

iphone

ios6

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. Storyboard and output

Hope you understand my problem.

like image 880
Sabarish Avatar asked Jan 28 '13 12:01

Sabarish


1 Answers

-(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.
}
like image 162
Vinayak Kini Avatar answered Sep 23 '22 20:09

Vinayak Kini