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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T08:06:34+00:00 2026-06-10T08:06:34+00:00

When I press the edit button I get the round delete icon to the

  • 0

When I press the edit button I get the round delete icon to the left of the item. When I press the delete icon in the cell it ‘turns’ but the delete button does not show up so my commitEditingStyle never gets called because I have no delete button to press.

Just for fun…I change the cell to Insert I get the plus icon…I press it and commitEditingStyle is called.

I do not understand why I am not getting the delete button.

I have a UIViewController that I am showing in a popover. I am adding a UITableView to like so…

audioTable = [[UITableView alloc] initWithFrame:CGRectMake(0, 44, self.view.frame.size.width, 303)];
audioTable.delegate = self;
audioTable.dataSource = self;
[self.view addSubview:audioTable];

I am using a custom cell with two labels in it to display text.

Here is the custom cell initWithFrame…

primaryLabel = [[UILabel alloc]initWithFrame:CGRectMake(25 ,8, 275, 25)];
primaryLabel.font = [UIFont systemFontOfSize:14];

secondaryLabel = [[UILabel alloc]initWithFrame:CGRectMake(25 ,28, 275, 25)];
secondaryLabel.font = [UIFont systemFontOfSize:12];

[self.contentView addSubview:primaryLabel];
[self.contentView addSubview:secondaryLabel];

[self.contentView sendSubviewToBack:primaryLabel];
[self.contentView sendSubviewToBack:secondaryLabel];

I have a delete button in a toolbar in the view controller that is hooked up to the edit call. Here is what I am doing in the edit call which is getting called fine because I am getting the delete symbol in the cell…

if([self.audioTable isEditing]) {
    [button setTitle:@"Edit"];
    [super setEditing:NO animated:NO];
    [self.audioTable setEditing:NO animated:YES];
} else {
    [button setTitle:@"Done"];
    [super setEditing:YES animated:NO];
    [self.audioTable setEditing:YES animated:YES];
}

I have implemented the following…

-(UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath {
     return UITableViewCellEditingStyleDelete;
}

-(BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
    //i don't think i need to implement this really
    return YES;
}

-(void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
    if (editingStyle == UITableViewCellEditingStyleDelete) {
        //do delete stuff
    }
}

Like I said everything is working normally, button presses and all work…just no delete button.

  • 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-10T08:06:36+00:00Added an answer on June 10, 2026 at 8:06 am

    I had to work around it by using a different mechanism. I did a test and when I used a UITableViewController it worked fine. When I added a UITableView to a UIViewController, implementing the same thing as the UITableViewController does, it does not work. I do not know what I missed, but using the UIViewController as opposed to the UITableViewController caused the delete button to not appear.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

SELECT works, Edit button works, but after editing, when I press Save the Grid
When I press CTRL + Space the auto completing not working. It doesn't show
So I am trying to get it so that when I press a button,
If I press the back button from my main activity I get a black
I have a UITableView with a custom cell. On the press of a button
Hi Does anyone know how to create a refresh button that when pressed it
I press login button to login into my app and I'm using asyncTask for
If you press Shift+Ctrl+T or choose Navigate > Open Type... you get the Open
One can get the text of the selected item in the list-view of a
I am trying to get a random string from an array when I press

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.