Skip to content

self.backgroundView is nil #1

@hydex86

Description

@hydex86

I'm trying to do the same you did in the example code, but something strange happens. My tableView has 5 cells. When I launch the application and debug your code, I can see self.backgroundView is nil. So their bounds are not set and the layer is nil.

But when launching finishes and I scroll down, on next cells loaded backgroundView is load correctly. I'm doing this:

UITableViewCell *cell = [self.tableView dequeueReusableCellWithIdentifier:CellIdentifier];
[cell addShadowToCellInTableView:tableView atIndexPath:indexPath];

Do you know what is probably happening? Autolayout is disabled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions