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

  • Home
  • SEARCH
  • 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 6924495
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:40:13+00:00 2026-05-27T10:40:13+00:00

I have a UITableViewCell with 3 checkmark buttons. Each checkmark button is a custom

  • 0

I have a UITableViewCell with 3 checkmark buttons. Each checkmark button is a custom UIButton (just the images really), and have an outlet in the custom UITableViewCell subclass. In the cellForRowAtIndexPath method, I

[cell.firstcheckmark addTarget:self action:@selector(checkmarkPressed:) forControlEvents:UIControlEventTouchUpInside];
[cell.secondcheckmark addTarget:self action:@selector(checkmarkPressed:) forControlEvents:UIControlEventTouchUpInside];
[cell.thirdcheckmark addTarget:self action:@selector(checkmarkPressed:) forControlEvents:UIControlEventTouchUpInside];

- (void)checkmarkPressed:(id)sender {
   // how do I get which checkmark was pressed?
}

I was not sure how to get which button was pressed from the sender object. Other times I can use the title of the button, but in this case, all the buttons are the same except their outlet. How do I get which button was pressed? Or do they each need to call a different method, and then in each of those three methods, I can update my model by calling the same modelUpdateMethod: from each of those three methods? Thanks.

  • 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-05-27T10:40:14+00:00Added an answer on May 27, 2026 at 10:40 am

    You can identify them by their tag:

    cell.firstcheckmark.tag = 0;
    

    And then

    - (void)checkmarkPressed:(id)sender {
    
       UIButton *button = (UIButton*)sender;
    
       if(button.tag == 0)
       {
          ...
       }
       ...
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a custom UITableViewCell which contains several UIButtons. Each button's frame position is
I have custom UITableViewCell s as well as headers and footers. Each of them
I have a custom UITableViewCell subclass. I have set the contentView of my cell
I have a UITableViewCell that has 2 UIButton instances. Both buttons have a default
I have a UITableViewCell that I create in tableView:cellForRowAtIndexPath: . In that method I
I have a UITableViewCell with a custom UIButton and UILable in the contentView. The
I have a UITableView with custom background images in each cell. The bottom cell
I have a custom UITableViewCell that has 2 buttons and a label on it.
I created a custom UITableViewCell in IB. I have a custom UIButton called CheckMarkButton
I have a UITableViewCell that is being instantiated (in the cellForRowAtIndexPath method) with [cell

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.