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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T00:34:30+00:00 2026-05-21T00:34:30+00:00

I am a newbie to iphone development and is not able to understand various

  • 0

I am a newbie to iphone development and is not able to understand various methods and all. I want to create a collapsible table view which expands and collapse on click of a button.

I have following pieces in my puzzle

1) I guess I will have to use these two methods for animation

[collapsibleTableView deleteRowsAtIndexPaths:editableIndexArray withRowAnimation:UITableViewRowAnimationTop ];
[collapsibleTableView insertRowsAtIndexPaths:editableIndexArray withRowAnimation:UITableViewRowAnimationTop ];

but I am not sure about argument which I need to pass to deleteRowsAtIndexPath: method and insertRowsAtIndexPath: method.

2) I have an array which is the datasource for this table.

It would be great if you can make me understand how it exactly needs to be done.

  • 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-21T00:34:31+00:00Added an answer on May 21, 2026 at 12:34 am

    got the answer and the implementation is

        - (NSArray*)indexPathsInSection:(NSInteger)section {
        NSMutableArray *paths = [NSMutableArray array];
        NSInteger row;
    
        for ( row = 0; row < [self numberOfRowsInSection:section]; row++ ) {
            [paths addObject:[NSIndexPath indexPathForRow:row inSection:section]];
        }
    
        return [NSArray arrayWithArray:paths];
    }
    
    -(NSInteger)numberOfRowsInSection:(NSInteger)section {
    
        return 4;
    }
    
    
    -(IBAction)expandCollapseMenu {
    
        NSArray *paths = [self indexPathsInSection:0];
        if (isExpanded) {
            isExpanded=NO;
            [actionBtn setTitle:@"Expand" forState:UIControlStateNormal];
    
            [menuTblView deleteRowsAtIndexPaths:paths withRowAnimation:UITableViewRowAnimationFade];
    
    
        }
        else {
            isExpanded=YES;
            [actionBtn setTitle:@"Collapse" forState:UIControlStateNormal];
            [menuTblView insertRowsAtIndexPaths:paths withRowAnimation:UITableViewRowAnimationFade ];
        }
    
    
    
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm a newbie in iPhone development and now encounter a problem: I want to
I am a newbie in iphone development and want to implement coverflow. I googled
I’m a newbie to iPhone app development and trying to create a Twitter-based iPhone
hello all m a newbie to iphone development. I have 5 themes in my
I am newbie in iPhone development. I want to start a project and want
newbie to iPhone game development and Box2D here. I'm developing a game in which
I'm a newbie to iphone development and I've been struggling with an EXC_BAD_ACCESS error
I am a newbie in the iPhone dev and I want to know if
Newbie here...can I write one program which incorporates .NET LINQ and also various Java
I am a newbie in iPhone Development.I developed an iPhone Application and installed this

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.