AccordionTableViewController icon indicating copy to clipboard operation
AccordionTableViewController copied to clipboard

Remote calling instead of gesture recogniser?

Open teamtomsk opened this issue 9 years ago • 2 comments

Hi, nice work by the way...

After much messing about I was hoping to remotely call an event to change the open section of the accordion - but can't figure it out for whatever reason. No doubt it is something really simple... Given you wrote it - is there any chance you could give me a clue or point me in the right direction to achieve this please? I have the triggering event setup and tested, just can't get it to fire and change the cell.

Thanks in advance if you are able to find a moment to help me out with this.

Cheers,

Stewart.

teamtomsk avatar Apr 29 '16 16:04 teamtomsk

You need to "update" an opened section, right?

On the example project (https://github.com/klevison/AccordionTableViewController/tree/master/Example) you can see how to do it. Something like:

    func updateSectionOne() {
        let section = self.sections[0]
        section.view!.frame = CGRectMake(0, 0, self.view.frame.size.width, 400)
        self.reloadOpenedSection()
    }

PS.: you can get the opened section calling self.openedSectionIndex

klevison avatar Apr 30 '16 23:04 klevison

Hi,

Thanks for getting back...

It's not an opened section I want to update, but open a closed section and close an opened section by passing an index value from another class.

E.g. a pageView is swiped and goes to the next page (with an index of 1)

Hope that was a little clearer.

Cheers,

Stewart.

teamtomsk avatar May 03 '16 10:05 teamtomsk