简体   繁体   中英

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

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

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? Thank you very much in advance

Check out the Tabster iphone app sample code. That should help you get over the hump. You need to use UITabBarController with array of UINavigationControllers depending on the complexity of your usecasse.

For the rows and sections, use UITableViewController. Just check any sample code of Apple on UITableViewController. They have plenty. Both simple and complex. Example: TableViewSuite

I think this could work as two UITableViewControllers, side by side. 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.

Along with the examples listed by mbh you might also watch the Stanford iOS class on iTunes U, specifically lecture 9 (Table Views).

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. http://www.stanford.edu/class/cs193p/cgi-bin/drupal/node/289

Good luck,

Damien

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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