iPhone开发-用表格视图显示浮动视图
我有一个选项卡栏应用程序,每个选项卡项上都有导航控制器。 我想在选项卡栏上方的表格视图上添加一个浮动(半透明视图)。 我怎样才能达到结果?
结果将类似于 Alpha 列表在联系人应用程序主视图右侧的显示方式。 我希望我能清楚地解释我想做什么。
任何想法? 谢谢。
I have a Tab Bar Application with Navigation Controllers on each Tab Item. I want to add a floating (semi transparent view) on my Table View just above my Tab Bar. How can i achieve the results?
The results will be similar to how the Alpha list is displayed on the right of Contact Application's main view. I hope i'm clear in explaining what i want to do.
Any idea? Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您想要做的只是在表视图上方显示浮动字母(或数字)索引,则只需在 UITableViewDataSource 中定义两个方法:
这些方法提供索引的部分标题的 AZ(或其他)列表,以及在表视图中,每个部分都开始。
对于更自定义的视图,您应该能够创建一个视图,将其背景设置为 [UIColor clearColor],布置其内容,并将其添加为表视图的子视图或作为表视图上方的子视图包含两者的视图。
If all you want to do is display the floating alphabetical (or numerical) index above your table view, you just need to define two methods in your UITableViewDataSource:
These provide the A-Z (or whatever) list of section titles for your index, and where in the table view each section starts.
For a more custom view, you should be able to create a view, set its background to [UIColor clearColor], lay out its contents, and add it as either a subview to the table view or as a subview above the table view in a view that encloses both.