A few years back, I have made an Accordion code using Objective C which is available here –> Accordion Objective C .

As a Swift learning strategy, I ported the code to Swift which works nice and smooth. Code available here –> AccordionSwift

-enjoy