iOS 7.保持UITableView部分标题不在顶部 [英] iOS 7. Keep UITableView section header from sticking on top

查看:145
本文介绍了iOS 7.保持UITableView部分标题不在顶部的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在设计一个包含类别和子类别的菜单:当用户点击某个类别时,它应展开以手风琴风格显示其子类别。

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.

我的问题:

- 是否有任何iOS7功能可以防止此行为,以便节标题像普通单元格一样继续移动?

- 我错过了一些UITableView功能是为手风琴式菜单设计的吗?

我知道这个旧线程.-

I'm aware of this old thread.-

更改默认滚动BEHA vit of UITableView Section Header

哪个解决方案基于使用 scrollViewDidScroll ,只是想知道是否有任何问题以手动方式执行任务的新功能。

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

推荐答案

如果使用UITableViewStyleGrouped,则节标题将向下滚动与细胞。

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

这篇关于iOS 7.保持UITableView部分标题不在顶部的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆