Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collapse Only 1 cell at a Time #19

Open
RizITN opened this issue Jan 8, 2014 · 3 comments
Open

Collapse Only 1 cell at a Time #19

RizITN opened this issue Jan 8, 2014 · 3 comments

Comments

@RizITN
Copy link

RizITN commented Jan 8, 2014

Hi,
I'm using your control in my project. I want to ask that is it possible that we can only collapse 1 cell at a time? Whenever I click on any header it should open only that view and must hide the remaining if already opened.

@bzark
Copy link

bzark commented Jan 9, 2014

If you are opening a cell in viewDidLoad you could store that globally and then in didClickCollapseClickCellAtIndex delegate you could do this.

[myCollapseClick closeCollapseClickCellAtIndex:currentIndex animated:YES];
currentIndex = index;

@bzark
Copy link

bzark commented Jan 9, 2014

Just thinking about what I wrote, you will need to put an if statement around the close call.

if (currentIndex != index)
[myCollapseClick closeCollapseClickCellAtIndex:currentIndex animated:YES];

@RizITN
Copy link
Author

RizITN commented Jan 10, 2014

Thanks For the reply. Yes your changes work fine.

Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants