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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T23:09:04+00:00 2026-06-09T23:09:04+00:00

I have custom cell in my tableview. when uitable view is in the editing

  • 0

I have custom cell in my tableview. when uitable view is in the editing mode. the rounded delete icon appears on the content of the cell.

How do I move the content to the right so to make place for the that little red rounded button.

In custom cell view layoutsubview should happen something. which subview of cell view should i resize?

thanks in advance

please take a look at my current code

- (void) layoutSubviews
 {
[super layoutSubviews];

CGFloat width = self.width - _productImage.right - 20.f;

if (self.accessoryView)
{
    width -= self.accessoryView.width;
}

_productName.width        = width;
_productDescription.width = width;
_productPrice.width       = width;

[UIView beginAnimations:nil context:NULL];
[UIView setAnimationBeginsFromCurrentState:YES];
[UIView setAnimationDuration:3.0f];

for (UIView *subview in self.subviews) {


    if ([NSStringFromClass([subview class]) isEqualToString:@"UITableViewCellDeleteConfirmationControl"]) {
        CGRect newFrame = self.contentView.frame;
        self.contentView.frame = CGRectMake(40, self.contentView.frame.origin.y, newFrame.size.width, newFrame.size.height);
    }
    else if ([NSStringFromClass([subview class]) isEqualToString:@"UITableViewCellEditControl"]) {
        CGRect newFrame = self.contentView.frame;
        self.contentView.frame = CGRectMake(40, self.contentView.frame.origin.y, newFrame.size.width, newFrame.size.height);
    }
    else if ([NSStringFromClass([subview class]) isEqualToString:@"UITableViewCellReorderControl"]) {
        CGRect newFrame = self.contentView.frame;
        self.contentView.frame = CGRectMake(40, self.contentView.frame.origin.y, newFrame.size.width, newFrame.size.height);
    }
}
[UIView commitAnimations];

}

  • 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-09T23:09:05+00:00Added an answer on June 9, 2026 at 11:09 pm

    You can check the tableview.isEditing property.

    If that is YES, then update the cell.contentView frame to x-difference otherwise use the default one.

    Hope this is what you required.

    Enjoy Coding 🙂

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

Sidebar

Related Questions

I have a custom tableview cell created programmatically that consists of: a background view
i have a tableView with a custom cell, my first cell is different with
I have a table view with a custom cell ( UISwitch on every cell
i have a custom cell i want to delete it when a button is
I have used custom cell in my tableview for different values and to save
I have a problem with my custom tableview cell. When I want to put
I have a table view with a custom cell (governed by a custom class
I build a TableView with custom TableViewCell, the first custom cell have a tool
I have custom table view cell with images (loaded from app document directory), labels,
I have a problem with a tableview and a custom cell. I have the

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.