[英]How to create Tabs like those those in Alarm section of apple Clock app in iPhone?
I need to create an ipad app for restaurant so it acts like a menu, To the left is a list of food and to the right is a column 我需要为餐厅创建一个ipad应用,因此它就像一个菜单,左边是食物列表,右边是一列
So when customer order something, say food A, A tab will be added to the right column, displaying food A on it Just like that in iPhone's clock app - Alarm section Customer can delete unwanted order later in the column 因此,当客户订购食品A之类的东西时,将在右侧列中添加一个标签,就像在iPhone的时钟应用中那样显示食品A-警报部分客户可以稍后在该列中删除不需要的订单
I'm new to xcode, so I imagine what I'm suppose to use is UITableView Can anyone give me some example on how to create those tabs? 我是xcode的新手,所以我想我应该使用UITableView,有人可以给我一些如何创建这些选项卡的示例吗? Thank you very much in advance 提前非常感谢你
Check out the Tabster iphone app sample code. 查看Tabster iphone应用示例代码。 That should help you get over the hump. 那应该帮助您克服困难。 You need to use UITabBarController with array of UINavigationControllers depending on the complexity of your usecasse. 您需要根据用例的复杂性,将UITabBarController与UINavigationControllers数组一起使用。
For the rows and sections, use UITableViewController. 对于行和节,请使用UITableViewController。 Just check any sample code of Apple on UITableViewController. 只需在UITableViewController上检查Apple的任何示例代码即可。 They have plenty. 他们有很多。 Both simple and complex. 既简单又复杂。 Example: TableViewSuite 示例: TableViewSuite
I think this could work as two UITableViewControllers, side by side. 我认为这可以作为两个UITableViewControllers并排使用。 One side is the list of what can be ordered, the other side is list of what has been selected. 一侧是可以订购的商品的清单,另一侧是已选择的商品的清单。 The first side is not editable, the second side is editable (to delete items no longer wanted). 第一面不可编辑,第二面不可编辑(删除不再需要的项目)。
Using UINavigationController is optional - it could certainly be done on 1 view without any pushing/popping of viewControllers. 使用UINavigationController是可选的-当然可以在1个视图上完成,而无需任何推入/弹出viewControllers。
Along with the examples listed by mbh you might also watch the Stanford iOS class on iTunes U, specifically lecture 9 (Table Views). 除了mbh列出的示例外,您还可以在iTunes U上观看Stanford iOS类,特别是第9课(表视图)。
If you need to save this data for later reference you'll also want to check out lectures 13 and 14 on Core Data - there is a very useful class called CoreDataTableViewController available - it could save you a couple days. 如果您需要保存这些数据以供以后参考,您还需要查看有关核心数据的第13和第14讲-提供了一个非常有用的类CoreDataTableViewViewController-它可以节省几天。 http://www.stanford.edu/class/cs193p/cgi-bin/drupal/node/289 http://www.stanford.edu/class/cs193p/cgi-bin/drupal/node/289
Good luck, 祝好运,
Damien 达米安
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.