Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm working on upgrading my app to a Universal App, I made the app originally in xCode 3 so I'm not using storyboarding at all.

I have a navigation controller that pushes two UITableView Controllers like this on the iPhone version:

iPhone: Welcome Screen View -> UITableViewController -> UITableViewController (detail) -> ViewController

What is the best way to make this iPad ready?

I understand I need to use a SplitViewController. Do I push an iPad specific SplitViewController from the welcome screen if the device is an iPad:

iPad: Welcome Screen View -> SplitViewController -> View Controller

but use the UITableView controller if it is an iPhone app, or should I somehow implement it so that I am using the same class for both devices?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
216 views
Welcome To Ask or Share your Answers For Others

1 Answer

Your flow looks about right. The split view controller would actually hold UITableViewController and UITableViewController (detail), so you don't have to actually write any new classes. You just have to make it so when you tap on a row in UITableViewController, it doesn't tell the navigation controller to push the detail table view controller, rather it simply updates it.

Generally, UISplitViewController is the root class, so you wouldn't put it in UINavigationController (which I'm not sure if it's possible to do that anyway). See if you can make your welcome screen a modal view controller (maybe even presenting using the form sheet style). As for View Controller, it depends on what you're using that specific class for.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...