开发者

In a tabbar application how do you turn the FirstViewController.h into a table view?

In Xcode开发者_运维百科 4 in a regular tabbar application created form the built in templates, how do you turn the firstView into a tableview?

Or is this the wrong approach, and you are supposed to drag a new tableview into the firstview xib and create a new controller for the table view. If so what you do with the firstview controller ? do you still need it?


You have two options:

1) Create new UITableViewController class with a corresponding XIB file, then delete the FirstViewController and replace it with your new UITableViewController. Remeber to change that in MainWindow.xib file

2) Insert UITableView onto your FirstViewController and implement UITableViewDelegate and UITableViewDataSource


You need to delete the files for the FirstViewController (.xib, .h, and .m), then add a new TableViewController. To get that set up, this might be of use: http://www.youtube.com/watch?v=LBnPfAtswgw Note: This video is a bit out of date, though the basic concept stays the same.

You could also just add a tableView to the FirstView.xib and follow a simple tableView tutorial. I would suggest my first option, though.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜