SEssentialsAccordion open/close event


I haven’t seen a clear way to do this, but is there an event that I can use when I open or close a section on a SEssentialsAccordion?


Greetings Program!

In the docs folder, you can find the delegate protocol reference here: ShinobiEssentials/Documentation/Protocols/SEssentialsAccordionDelegate.html

It lists all of them:

Section Opening
– accordion:shouldOpenSection:
– accordion:willOpenSection:
– accordion:didOpenSection:

Section Closing
– accordion:shouldCloseSection:
– accordion:willCloseSection:
– accordion:didCloseSection:

Section Removal
– accordion:shouldRemoveSection:
– accordion:willRemoveSection:
– accordion:didRemoveSection:

Section Insertion
– accordion:willInsertSection:atIndex:
– accordion:didInsertSection:atIndex:

Section Moving
– accordion:shouldMoveSectionFromIndex:toIndex:
– accordion:willMoveSectionFromIndex:toIndex:
– accordion:didMoveSectionFromIndex:toIndex:

Make sure to add the SEssentialsAccordionDelegate and set it:

accordion.delegate = self;

and you’re good to go:

- (void)accordion:(SEssentialsAccordion *)accordion willOpenSection:(SEssentialsAccordionSection *)section

- (void)accordion:(SEssentialsAccordion *)accordion didCloseSection:(SEssentialsAccordionSection *)section