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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T15:02:15+00:00 2026-06-11T15:02:15+00:00

I have a UITableView with custom subviews in its cells. When a user does

  • 0

I have a UITableView with custom subviews in its cells. When a user does swipe-to-delete gesture on a cell my view is shrunk for a moment while the “Delete” button is being appeared.

As I understand it happens due to some system animation which takes place when the “Delete” button is to be appeared and my subview needs to become shorter. I set my subview’s contentMode to UIViewContentModeRedraw and everything looks fine after animation is finished.

I looked how this works in build-in Mail application and everything is fine there.

How can I avoid this shrinking? Is it possible to change this animation to “fade out” or something? Or can I handle a moment when this animation is started to make my subview shorter right away?

SOLUTION:

Finally I found a solution by subclassing UITableViewCell and overriding layoutSubviews method in the following way:

- (void)layoutSubviews
{
    [super layoutSubviews];

    UIView *view = [self.contentView viewWithTag:101];
    CATransition *animation = [CATransition animation];
    animation.duration = 0.2f;
    animation.type = kCATransitionFade;
    [view.layer removeAllAnimations];
    [view.layer addAnimation: animation forKey:@"deletingFade"];
}

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-06-11T15:02:16+00:00Added an answer on June 11, 2026 at 3:02 pm

    Override layoutSubviews method in UITableViewCell derived class and update positions for all your subviews accordingly to contentView.bounds.size of the cell.

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

Sidebar

Related Questions

I have an UITableView showing custom view cells that I've designed in interface builder.
I have a UITableView with custom cells. Inside each cell is 2 views. Each
I have a uitableview with custom uitableviewcell. To hide keyboard user should scroll up
I have a custom UITableView cell that has a UIImageView sized to the width
i have a custom UITableView Cell, i have selected a particular cell and goes
I have a UITableView with two custom cells and each of them has a
I have created a UITableView with a custom UITableViewCell . My cell includes one
I have a UITableView of custom UITableViewCells which looks like this: [ CELL 0
I have UITableView with Custom View on it. For the bottom of the tableview,
I just have a quick best practice question regarding custom cells in a UITableView.

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.