Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9185693
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T19:20:21+00:00 2026-06-17T19:20:21+00:00

Possible Duplicate: How to know the UITableview row number I have a tableView and

  • 0

Possible Duplicate:
How to know the UITableview row number

I have a tableView and a tableViewCell on this tableView. I defined another class for the tableViewCell called CustomCell so that I coded the necessary customizations and also created a button (on this cell). When the button on a tableViewCell is clicked, I want to learn which tableViewCell contains that button so that I can make the necessary changes only to that cell (which contains the button clicked)

How can I understand that which tableViewCell contains the button that is clicked?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T19:20:22+00:00Added an answer on June 17, 2026 at 7:20 pm

    One strategy for implementing this is to assign a tag with the row number to the button that was pressed:

    - (UITableViewCell *)tableView:(UITableView *)tableView 
             cellForRowAtIndexPath:(NSIndexPath *)indexpath {
        YourCustomCell *cell = // Code
        cell.button.tag = indexPath.row;
    
        // Other cell preparation code
    
        return cell;
    }
    

    Then, in the action for the button, you can see what its tag is to determine what model object that corresponds to:

    - (void)didSelectButton:(id)sender {
        UIButton *button = sender;
        NSInteger tag = button.tag;
    
        YourModelObject *item = self.items[tag];
    
        //    Continue with the business logic for what should
        //    happen when that button is pressed.
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: JavaScript: Know when an image is fully loaded I have this code:
Possible Duplicate: @class May I know the proper use of this I am wondering
Possible Duplicate: How to know if Process.Start() is successful? I have a process similar
Possible Duplicate: Why XML-Serializable class need a parameterless constructor Does anyone know if it
Possible Duplicate: Undefined, unspecified and implementation-defined behavior I know calling delete on same object
Possible Duplicate: Default class inheritance access I know I can set the protection level
Possible Duplicate: Objective C for Windows I know there are several posts about this
Possible Duplicate: PHP passing parameters via URL I know that if you have a
Possible Duplicate: Java garbage collection I know that we have to free object in
Possible Duplicate: How can I know a number of uploaded files with PHP? Hello,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.