Search code examples
uiviewglowviewdidappear

Using the UIView-Glow category on UITableViewCell


I'm using the UIView-Glow category trying to highlight certain UITableViewCells. But it doesn't work if it's used in tableView:cellForRowAtIndexPath:. I guess it must be used after the certain view appeared on the screen. So, is there a possibility to let certain UITableViewCells glow (even when scrolling the table view)?


Solution

  • Yes, there is possibility to let certain UITableViewCells glow with the category file you mentioned. You need to call the category methods in the table view delegate willDisplayCell instead of cellForRowAtIndexPath.

    For example:

    - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
    {
        [cell startGlowing];
    }