在 iPhone App Store 应用程序中,特色视图顶部的控件是什么?
是分段控制吗?
关于特色视图,它是纯粹的表格视图吗?他们如何使分段控件永久存在,而不是随着下面的表格单元格滚动?
Is it a Segmented Control?
About the featured view, is it purely a tableview? how could they make the Segmented Control to be permanent instead of scrolling with the table cells down below?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
正如 Ertebolle 所说,它是一个设置为 navigationItem 的 titleView 的 UISegmentedControl。
您还可以通过添加 UITableView 作为 UIViewController 视图的子视图,在视图中创建不随 tableview 滚动的元素。设置其框架属性意味着您可以在视图中的固定特定位置拥有可滚动的表格视图,以及视图中不随其滚动的其他元素。
as Ertebolle says its a UISegmentedControl set as the titleView of the navigationItem.
You can also create elements within the view that don't scroll with the tableview by adding a UITableView as a subview of a UIViewController's view. Setting its frame property means that you can have a scrollable tableview in a fixed certain position in your view and other elements in the view that don't scroll with it.
是的,我相信它是一个
UISegmentedControl
。但它被设置为导航栏的标题视图 - 要重现整个效果,您需要创建一个UINavigationController
,将UITableViewController
推入其中作为顶部视图,然后将表视图控制器的navigationItem
的titleView
设置为该分段控件。这会自动将工具栏/分段控件锚定在顶部。Yes, I believe it is a
UISegmentedControl
. But it's set as the title view of the navigation bar - to reproduce the whole effect, you'd create aUINavigationController
, push aUITableViewController
as the top view in it, and set thetitleView
of the table view controller'snavigationItem
to that segmented control. This would automatically anchor the toolbar / segmented control on top.