Have have created a child of UITableViewCell
, MenuItem
which contains functionality for my custom table cell. I have also created a xib-file with a custom cell and set the UITableViewCell
in the xib-file to have the class MenuItem
. The name of the xib-file is MenuItem
as well. In my UITableViewController
class I'm doing this in ViewDidLoad
:
UINib *menuItems = [UINib nibWithNibName:@"MenuItem" bundle:nil];
[[self tableView] registerNib:menuItems forCellReuseIdentifier:@"MenuItem"];
But the background color used in the xib-file isn't used in the cells the table displays. If I add a new label, it shows up, but the background color is just plain white. Does anyone know why?
EDIT: I do use [tableView dequeueReusableCellWithIdentifier:@"MenuItem"];
in cellForRowAtIndexPath
.