Search code examples
iosobjective-cuitableviewcell

UITableViewCell resizing automatically when presented


I have a strange problem.

When my UITableView is presented, for a brief second, the cells change their height(not much but its noticeable and i do not like it). And it only changes when the device is running IOS 8. I tried it on my device using IOS 7 and nothing happened. Anyone knows what this can be?


Solution

  • There may be a discrepancy between the UITableViewCell height in your xib/storyboard and the height you're specifying in the delegate method heightForRowAtIndexPath.

    Edit:

    If that isn't your issue, try calling that delegate method:

    - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { 
        return 60; 
    }
    

    or:

    Specifying a height that is not 'default' since the resizing probably has something to do with the scaling of device size.