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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T12:17:02+00:00 2026-06-06T12:17:02+00:00

I need to style the default delete button on a tableview cell in objective

  • 0

I need to style the default delete button on a tableview cell in objective c, ios5. The general idea is the assumption that you can do something like this:

    UIImage *addImage = [UIImage imageNamed:@"greenButtonDark.png"];
    UIButton *addButton = [UIButton buttonWithType:UIButtonTypeCustom];
    addButton.frame = CGRectMake(0, 0, addImage.size.width, addImage.size.height);

    [addButton setImage:addImage forState:UIControlStateNormal];
    [addButton addTarget:self action:@selector(pushAddItem) forControlEvents:UIControlEventTouchUpInside];

    UIBarButtonItem *addBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:addButton] ;

    self.navigationItem.rightBarButtonItem = addBarButtonItem;

The above code is called in the viewDidLoad method and overwrites the right button in the header. I assume there is something comparable for any button the system adds by default but I don’t know how to access this particular one.

If I am failing to articulate this, the delete button I refer to is the one automatically generated with this code…

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

If I need to clarify anything let me know. Thanks.

enter image description here

  • 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-06T12:17:03+00:00Added an answer on June 6, 2026 at 12:17 pm

    Take a look at this answer iPhone UITableView – Delete Button, it should basically answer your question. In short you might need to subclass UITableViewCell and override the -(void)willTransitionToState:(UITableViewCellStateMask)state and -(void)didTransitionToState:(UITableViewCellStateMask)state and modify the button here.

    Another alternative might be subclassing the UITableViewCell and implementing the delete button functionality yourself (recognize the swipe gesture, present the button and handle when it’s pressed in a similar way the default method of UITableView delegate does).

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

Sidebar

Related Questions

I need to change the UITableView cell selection style from default blue to red.
I need to find some default style values. In my case that is the
I need to style the browse button of file upload in GWT.... I found
I've got an HTML select box that I need to style. I'd prefer to
I need a simple <hr/> in a page that extends a default one (I'm
Just learning about mercurial's --style and --template options that can be used on hg
I did something silly I think. I changed my cell style to 'code' and
I have an issue with DataGridView. The default cell style has some margin or
The default style for my document is that paragraphs are indented. That's fine. But
I need to style a regular html list like the following picture: as you

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.