小编use*_*867的帖子

如果未声明heightForRowAtIndexPath,则iOS 7.1会崩溃

我试图estimatedHeightForRowAtIndexPath通过AutoLayout 使用动态单元格高度,并在iOS8中按预期工作,但在iOS7.1中通过这样说:

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[MyProject.ViewController tableView:heightForRowAtIndexPath:]: unrecognized selector sent to instance 0x79e91350'

在此输入图像描述

如果我定义heightForRowAtIndexPath,错误消失,但单元格不会自动调整大小.任何的想法?

更新:它确实可以在iOS 7.0中使用,对吗?

在此输入图像描述

uitableview autolayout ios7 ios7.1

3
推荐指数
1
解决办法
1474
查看次数

标签 统计

autolayout ×1

ios7 ×1

ios7.1 ×1

uitableview ×1