Search code examples
uitableviewstoryboardcustom-controlsreuseidentifierregisterclass

UI control not display content in custom tableviewcell with storyboard


I don't understand why the label i had in my storyboard don't show up when a run the app with IOS8 and XCODE 6.1.1 enter image description here I have bound my label to a custom UiTableviewCell and i can set the text but my label don't appear in the subview of the content view of the cell return by tableView dequeueReusableCellWithIdentifier:CellIdentifier];

If a using [self.tableView registerClass:[NewGameCell class] forCellReuseIdentifier:@"ListNewGameCell"]; I can't use the storyboard.

I read all the others question and i can't find the answer. Thanks


Solution

  • Try this....

    -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
    {
        YourCustomCell *cell = (YourCustomCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
        return cell;
    }