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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T15:15:35+00:00 2026-05-29T15:15:35+00:00

The one you see below is a screen shot of Tweetbot iPhone application .

  • 0

The one you see below is a screen shot of Tweetbot iPhone application.
What I want to ask is if you know a way I can achieve what the Tapbots guys achieved in their tableView: you tap on a cell of the former tableView and it reveals a set of actions, tap again and it disappear.

enter image description here

It is a really cool looking implementation and I would love to know your opinion on how I can do that both for practice and also because I would love to use a variant of this in a future project.

Any idea?

  • 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-05-29T15:15:37+00:00Added an answer on May 29, 2026 at 3:15 pm

    When the user selects the cell save the the index path of the selected cell and add a row below it. If the user selects the same sell hide the row below it. If the user selects another cell hide the currently selected cell and show a new cell below the newly selected cell.

    @interface RCTableViewController ()
    
    @property (nonatomic, strong) NSMutableArray *tableViewData;
    @property (nonatomic, strong) NSIndexPath *selectedIndexPath;
    
    @end
    
    @implementation RCTableViewController
    
    @synthesize tableViewData = _tableViewData;
    @synthesize selectedIndexPath = _selectedIndexPath;
    
    - (void)viewDidLoad
    {
        [super viewDidLoad];
    
        self.tableViewData = [NSMutableArray arrayWithObjects:
                     @"Cell 0",
                     @"Cell 1",
                     @"Cell 2",
                     @"Cell 3",
                     @"Cell 4",
                     @"Cell 5",
                     @"Cell 6",
                     @"Cell 7",
                     @"Cell 8",
                     nil];
        self.selectedIndexPath = nil;
        [self.tableView reloadData];
    }
    
    - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
    {
        return 1;
    }
    
    - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
    {
        return self.tableViewData.count;
    }
    
    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
    {
        UITableViewCell *cell;
    
        if (indexPath == self.selectedIndexPath) {
            static NSString *DropDownCellIdentifier = @"DropDownCell";
    
            cell = [tableView dequeueReusableCellWithIdentifier:DropDownCellIdentifier];
            if (cell == nil) {
                cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:DropDownCellIdentifier];
            }
    
            cell.textLabel.text = @"Drop Down Cell";
    
        } else {
            static NSString *DataCellIdentifier = @"DataCell";
    
            cell = [tableView dequeueReusableCellWithIdentifier:DataCellIdentifier];
            if (cell == nil) {
                cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:DataCellIdentifier];
            }
    
            cell.textLabel.text = [self.tableViewData objectAtIndex:indexPath.row];
        }
    
        return cell;
    }
    
    - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
    {
        NSIndexPath *dropDownCellIndexPath = [NSIndexPath indexPathForRow:indexPath.row + 1
                                                                inSection:indexPath.section];
    
        if (!self.selectedIndexPath) {
            // Show Drop Down Cell        
            [self.tableViewData insertObject:@"Drop Down Cell" atIndex:dropDownCellIndexPath.row];
    
            [tableView insertRowsAtIndexPaths:[NSArray arrayWithObject:dropDownCellIndexPath] 
                             withRowAnimation:UITableViewRowAnimationTop];        
    
            self.selectedIndexPath = indexPath;    
        } else {
            NSIndexPath *currentdropDownCellIndexPath = [NSIndexPath indexPathForRow:self.selectedIndexPath.row + 1
                                                                    inSection:self.selectedIndexPath.section];
    
            if (indexPath.row == self.selectedIndexPath.row) {
                // Hide Drop Down Cell
                [self.tableViewData removeObjectAtIndex:currentdropDownCellIndexPath.row];
    
                [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:currentdropDownCellIndexPath]
                                 withRowAnimation:UITableViewRowAnimationTop];
    
                self.selectedIndexPath = nil;
            } else if (indexPath.row == currentdropDownCellIndexPath.row) {
                // Dropdown Cell Selected - No Action
                return;
            } else {
                // Switch Dropdown Cell Location     
                [tableView beginUpdates];
                // Hide Dropdown Cell
                [self.tableViewData removeObjectAtIndex:currentdropDownCellIndexPath.row];
    
                [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:currentdropDownCellIndexPath]
                                 withRowAnimation:UITableViewRowAnimationAutomatic];
    
                // Show Dropdown Cell            
                NSInteger dropDownCellRow = indexPath.row + ((indexPath.row >= currentdropDownCellIndexPath.row) ? 0 : 1);
                dropDownCellIndexPath = [NSIndexPath indexPathForRow:dropDownCellRow
                                                           inSection:indexPath.section];
    
    
                [self.tableViewData insertObject:@"Drop Down Cell" atIndex:dropDownCellIndexPath.row];
    
                [tableView insertRowsAtIndexPaths:[NSArray arrayWithObject:dropDownCellIndexPath] 
                                 withRowAnimation:UITableViewRowAnimationAutomatic];        
    
                self.selectedIndexPath = [NSIndexPath indexPathForRow:dropDownCellIndexPath.row - 1 
                                                            inSection:dropDownCellIndexPath.section];
                [tableView endUpdates];                            
            }        
        }
    }
    
    @end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Maybe the worst type of error message that one can see. Does not mean
When I configure my application to use HiLo Id generation, I see one round-trip
I have firebug installed and I can see on one of my 'Net' requests
I'm self-learning iPhone development and I see that one of the aspects of an
I have a list of keywords and want to see if one cell contains
Is there a way in JavaScript to compare values from one array and see
I just started getting this error today, seemingly out of nowhere. Any one see
At work I see one colleague designing a site in Photoshop/Fireworks, I see another
Didn't find any from their website. I mostly just trying to see which one
I'm trying to use the microsoft_maps_mapcontrol. I see how one could create a pushpin

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.