appsome / AccordionView

Simple accordion view in Cocoa Touch
Other
144 stars 38 forks source link

Tapping on the last header collapses its view leaving a white space under it #11

Closed Isuru-Nanayakkara closed 10 years ago

Isuru-Nanayakkara commented 10 years ago

First off thanks for the cool control. I seem to have found some sorta bug in it.

I have a accordion view 5 headers and a view attached to each of them. Initially it looks like this.

screen shot 2014-01-24 at 11 25 35 pm

Say I tap on the last header and now it looks like this,

screen shot 2014-01-24 at 11 26 42 pm

But then I tap on the orange header again and it's view closes leaving a white space beneath it. Like so,

screen shot 2014-01-24 at 11 28 37 pm

How can I stop this from happening? Is there a property I'm missing out or is this really a bug?

Thank you.

suda commented 10 years ago

Well it's not a bug, you've just collapsed all panels :) White background belongs to accordion view and can be changed with accordion.backgroundColor = [UIColor clearColor]

I can add allowsEmptySelection property which would disable this behavior (would force at least one open panel) if you need this.

Isuru-Nanayakkara commented 10 years ago

Hi Suda, thanks for the prompt response. Yes please can you add it? That would be great! :)

suda commented 10 years ago

@Isuru-Nanayakkara check out now :)

Isuru-Nanayakkara commented 10 years ago

Works perfect! Thanks, man. I really appreciate it! :) :+1: