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 1019131
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T10:57:50+00:00 2026-05-16T10:57:50+00:00

I created a UITableViewCell in Interface Builder which I have added a UIImageView and

  • 0

I created a UITableViewCell in Interface Builder which I have added a UIImageView and a UIButton to. I have given the UIButton an outlet, and hooked it up to a IBAction with the touch up inside event set. I assumed it would call this method, as everything looked like it is hooked up:

- (IBAction)pressedCheckbox:(id)sender {
    [sender setBackgroundImage:[UIImage imageNamed:@"checked.png"] forState:UIControlStateNormal];
    NSLog(@"clicked check");

}

Checking the connections tab, I have everything set correctly, the outlet and the action. And I get no errors, but when previewing the app, clicking on that button inside the UITableViewCell does nothing, and I don’t see anything in the logs.

Ideas on why it won’t let me click my button which is in a UITableViewCell?

EDIT:

Code for cellForRowAtIndexPath:

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

    static NSString *CellIdentifier = @"Cell";

    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
        cell.editingAccessoryType = UITableViewCellAccessoryDisclosureIndicator;
        cell.selectionStyle = UITableViewCellSelectionStyleNone;
    }

    if (indexPath.section == 0) {
        switch (indexPath.row) {
            case 0:
                cell = topCell;
                break;
            case 1: 
                cell = cell1;
                break;
        }//end switch

    }//end if

    return cell;
}
  • 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-16T10:57:51+00:00Added an answer on May 16, 2026 at 10:57 am

    I also figured out what the problem was. I was needing to set different heights for cells and was using:

    - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
    
         if (indexPath.section == 0) {
    
              switch (indexPath.row) {
    
                   case 0:
    
                        return 26;
    
                        break;
    
              }//end switch
    
         }//end if
    
         return tableView.rowHeight; <-- I just added this and it fixed the issue
    
    }
    

    Previously I was only returning a value for cell 0, so it was causing issues with all my other cells

    • 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 I created in Interface Builder. I am successfully
I have a custom UITableViewCell created through code (not Interface Builder). I have sub-views
I have a nib-based table view cell which I created in Interface builder. I
I have created a UITableViewCell using UITableViewCellStyleValue1, which the Apple docs define as: A
I have a simply MainWindow file created by the Interface Builder in black background.
I converted my old UITableViewCell from being programmatically created to using Interface Builder and
In interface builder i've created a UITextfield within a subclass of a UITableViewCell. The
I have a static table created in Interface Builder with 6 sections all with
I have created a custom UITableViewCell that is added as a subview to my
I created a custom UITableViewCell subclass which contains a button named testbtn . I

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.