---
title: "Send table view cell value on button action in IOS"  
description: "Send table view cell value on button action in IOS"  
author: "Anonymous User"  
published: 2015-11-28  
updated: 2015-11-30  
canonical: https://www.mindstick.com/forum/33654/send-table-view-cell-value-on-button-action-in-ios  
category: "iphone"  
tags: ["iphone", "ios", "objective c"]  
reading_time: 1 minute  

---

# Send table view cell value on button action in IOS

I have created a [table view](https://www.mindstick.com/forum/33709/how-to-use-table-view-controller-with-small-sized-in-ios) that [lists](https://www.mindstick.com/articles/126273/books-commonly-found-on-college-reading-lists) some [records](https://www.mindstick.com/forum/34640/how-to-create-a-stored-procedure-for-display-all-records) in table view cell.\
[Now](https://yourviews.mindstick.com/view/81402/it-s-liberals-vs-progressives-in-us-politics-now), I want to send [cell value](https://www.mindstick.com/forum/23092/how-to-hide-imagebutton-based-on-row-cell-value) whenever I [click](https://www.mindstick.com/articles/12423/social-login-magento-2-one-click-to-register-social) on Button.

If any one have solution then please reply me.

## Replies

### Reply by Tarun Kumar

You can use this code to display image grid into UICollectionView.\
One thing is very important to do is that don't forget to set the delegate in collection.

this is the code I am using in our application, and in your **xib** file add **UIImageView** on your **CollectionViewCell** and also tag [value](https://www.mindstick.com/articles/23219/an-optimized-description-adds-value-to-experience-and-in-turn-effectively-guest-posting-packages) to 100.

```
- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView{   return [imgArray count];}- (NSInteger)collectionView:(UICollectionView *)collectionView  numberOfItemsInSection:(NSInteger)section{   return 1;}- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{   static NSString *identifier = @"Cell";   ImagesCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:identifier forIndexPath:indexPath];   UIImageView *img = (UIImageView *)[cell viewWithTag:100];   img.image = [imageArray objectAtIndex:indexPath.row];   return cell;}
```


---

Original Source: https://www.mindstick.com/forum/33654/send-table-view-cell-value-on-button-action-in-ios

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
