How to set up UITableView within a UIViewController created on a .xib file

Viewed 33393

I have a class like this:

@interface ExerciseLogDetails : UIViewController<UIActionSheetDelegate, UITableViewDelegate, UITableViewDataSource> {

where I am trying to display some elements followed by a UITextView. The UITextView element is created on Interface Builder. When executing this code:

- (void)viewDidLoad {
self.tableView = [[UITableView alloc] initWithFrame:self.view.bounds       style:UITableViewStylePlain];
tableView.dataSource = self; 
tableView.delegate = self;
[self.view addSubview:self.tableView];
}

a table shows, but not the one I configured in Interface Builder. It is completely blank and unformatted. How can I access my table and populate it progrmmatically with data?

Thank you!

3 Answers
Related