Collapsable/Accordion like view in iOS
I am trying to develop a collapsable/accordion like feature in my iOS app. This would be your typical FAQ type feature that would be found on web sites. I would like to tap the heading and then the detail is displayed.
Since this is for the help section and there are only a few items I thought I would be super simple to embed an HTML file with some JS in it to perform the action and render it in a web view. I got that to work without an issue. It loads and works great. However, with the web view I can 'bounces'/pull down the view to reveal the background of the main view. Now, this would not be a problem normally but since the designers use some gradients it looks awful. I set bounces to false and all is well but not super smooth when scrolling.
Here is an example of the accordion I am talking about.
I then found this project.
Which is a little more on the right track. But the table view height stays fixed and does not act like the other accordion view.
My question is this....am I missing something? Should I be looking at a different design pattern? Any ideas are appreciated.
I never found the answer. I ended up creating a basic master - details table view instead.
I created an array with 4 dictionary objects. Each object has a title and an array of the items for the details.
My main table view is showing the 4 dictionary object titles and the detail view is showing the rest of the array elements. Seems fine. I was hoping to find a dynamically sizing table view but no such luck. Maybe for the next release.