ssantos
ssantos

Reputation: 16526

iOS 7. Keep UITableView section header from sticking on top

I'm designing a menu with categories and subcategories: when the user clicks a category, it should unfold to show its subcategories in an accordion style.

My first approach (and the easiest, I guess), is setting a table section per category: section headers would contain the category, and the inner cells would be subcategories, but the default behavior of the section headers staying at the top doesn't fit too well with the design of my interface.

My questions:

- Is there any iOS7 feature to prevent this behavior so that section headers keep moving just as a normal cell?

- Am I missing some UITableView feature conceived for accordion styled menus?


I'm aware of this old thread.-

Change Default Scrolling Behavior of UITableView Section Header

which solution is based on using scrollViewDidScroll, just wondering if there's any new feature to perform the task in a 'less manually' way.

Upvotes: 0

Views: 2713

Answers (1)

pdpAxis
pdpAxis

Reputation: 91

If you use UITableViewStyleGrouped then the section headers will scroll down with the cells.

Upvotes: 9

Related Questions