简体   繁体   中英

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM