I have a TabBar app built in Xcode 4.2.1 using storyboards. The problem is that a UITableView is not reflecting changes I make in IB. For example: when I use IB to make changes to Background Color, Scroller visibility, separator color, there have no visible effect on the UITableView.
However, if I set these params programmatically, they work great. What am I missing? Some code below:
- (void)viewDidLoad
{
[super viewDidLoad];
// get a pointer to our delegate. This is where the data will be stored
// which gets passed between the Views (e.g. Favorites)
appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
myTableView = [[UITableView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame] style:UITableViewStylePlain];
myTableView.dataSource = self;
myTableView.delegate = self;
// myTableView.backgroundColor=[UIColor blackColor];
// this will suppress the separator lines between empty rows.
UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 1, 1)];
myTableView.tableFooterView = view;
self.view = myTableView;
}
FIXED: The above class extended ViewController. I changed it to extend UITableViewController and everything fell into place. The viewDidLoad() method is now greatly simplified because many of the things I was manually configuring are handled automatically by the UITableViewController class. I can now change the UITableView params in IB as expected.