Reputation: 837
I am trying to create a UITableView view (I guess a subview) inside another controller's view. Essentially here is the (simplified) structure I want for the Settings page I am designing:
I tried adding a UITableView object to my .XIB file, then creating outlets for it inside the SettingsViewController.h file, but that didn't quite work. The table showed, but only in its default format - none of the DataSource methods worked.
I got rid of the code (temporarily), but if you need specifics, I should be able to reproduce it quickly and offer you some. Plus, I might do it right this time...
P.S. Using UITableView is not mandatory. If there is another handy way of displaying and editing a list of items (NSStrings really), I'd be fine with it.
Upvotes: 1
Views: 1240
Reputation: 90117
if your tableView is empty and the dataSource methods are correctly implemented you probably just forgot to connect your tableView to the dataSource/delegate.
control-drag from the tableView to the viewController and set dataSource and delegate.
Upvotes: 1