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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T10:57:50+00:00 2026-06-07T10:57:50+00:00

I have 2 questions that I am having trouble answering. I have a UITableView

  • 0

I have 2 questions that I am having trouble answering.

I have a UITableView and when you touch a cell, it changes its height and inserts a sub view with some detail.

The problem is that when I select another cell, there is no obvious way to collapse the other cell. What I did as a temporary fix is run a loop whenever you select a cell, and on each cell, if its not the one you selected, it collapses it. This does not seem efficient, does anyone have an idea?

Second question is, whenever I collapse a cell, it animates. but it removes the detail subview kind of jarringly, is there a way to wait till the cell is done animating to remove it? I cannot find an appropriate delegate method.

Thanks in advance.

  • 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-07T10:57:52+00:00Added an answer on June 7, 2026 at 10:57 am

    Perhaps the best way would be to have a variable that stores the index path (row) of the previously touched cell. Then, test to see if the current cell’s index is not equal to the previous, collapse the previous cell and open the new one.

    For your second issue, can you not animate the collapse before you remove the subview? I assume you’re using [UIView beginAnimations] (or something similar). Set the duration of the animation [UIView setAnimationDuration:1.0], and then after you commit the animations, do [self performSelector:@selector(collapseCell) withObject:nil afterDelay:1.0].

    I’ve not tested this, and I’m going off of memory, so sorry if it doesn’t work as you’d hoped, but perhaps it can get you going in the right direction.

    Edit: Apologies, I didn’t see your “Core Animation” tag. The second solution may not be right for you.

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

Sidebar

Related Questions

I have a seemly simple question with SQL that I am having trouble figuring
I have a rather unique problem that I'm having trouble solving. I have a
I am having trouble encrypting a connection string in app.config. I have code that
Very simple question that I've been having trouble answering. In Windows XP and Server
I have a few questions that will help me understand things better if answered:
I have a few questions that I hope clarity and facts can be fed
Given a set of questions that have linked survey and category id: > db.questions.find().toArray();
I know there are other questions that have similar issues, but I have read
This is a little different than the questions that have already been asked on
I have a list of questions that the user will iterate through, they can

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.