当我滚动时,我可以将表格的桌面位置固定吗? [英] Can i make a table's tableHeaderView position fixed as I scroll?

查看:170
本文介绍了当我滚动时,我可以将表格的桌面位置固定吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个表视图,并附加到其tableHeaderView一个UISegmentedControl。如何使tableHeaderView固定,以便即使我在滚动表视图时也可以始终在同一位置查看UISegmentedControl?

I have a table view and have attached to its tableHeaderView a UISegmentedControl. How can I make the tableHeaderView fixed so that i can always view the UISegmentedControl in the same position even when i am scrolling the table view?

推荐答案

tableView:ViewForHeaderInSection:是您完成任务的选择。在普通表格中,这将看起来像地址簿应用程序,其中第一个字符名称在部分中,但您将拥有分段控件

tableView:ViewForHeaderInSection: is your option to achieve your task. In plain table this will somehow looks like Address Book app with first char of name in section, but you will have your segmented control

这篇关于当我滚动时,我可以将表格的桌面位置固定吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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