简体   繁体   English

如何在iPhone应用程序中创建轮播菜单栏

[英]How to create a carousel menu bar in an iPhone app

I am attempting to develop an iPhone application which has a tab bar at bottom, a navigation bar at top and below this a navigation bar which is a carousel menu bar. 我正在尝试开发一个iPhone应用程序,该应用程序的底部有一个选项卡栏,顶部有一个导航栏,而下面有一个导航栏,该导航栏是轮播菜单栏。 This carousel menu bar is similar to media carousel menu on the iPod, but it is thinner and just contains text menu items, which the one on top bigger and the others smaller (similar to the and the CNBC Financial App ). 该轮播菜单栏类似于iPod上的媒体轮播菜单,但它更薄,只包含文本菜单项,其中一个菜单项较大,另一个较小(类似于和CNBC Financial App )。 How can I do this? 我怎样才能做到这一点?

The easiest way is to use a UITableView and customize the cells height. 最简单的方法是使用UITableView并自定义单元格的高度。 Refer to the Table View Programming Guide: http://developer.apple.com/iphone/library/documentation/UserExperience/Conceptual/TableView_iPhone/AboutTableViewsiPhone/AboutTableViewsiPhone.html 请参阅《表格视图编程指南》: http : //developer.apple.com/iphone/library/documentation/UserExperience/Conceptual/TableView_iPhone/AboutTableViewsiPhone/AboutTableViewsiPhone.html

Another way is to use a UIScrollView and add subviews (UIViews or UITextView): smaller ones for dividers and larger ones for text items. 另一种方法是使用UIScrollView并添加子视图(UIViews或UITextView):较小的用于分隔符,较大的用于文本项。

Good luck! 祝好运!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM