「记录」UITableView运行时动态改变行高

在cell中加入一个可以改变cell高度的button,就是下面这种效果

1025465-d0c0d390136803e8

核心代码:

在Cell.h中添加tableview更新块属性:

button的点击事件:

在TableViewController的- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 方法中添加:

参考资料:http://www.jianshu.com/p/e86f1989b1d6

iOS7 8 UITableView Separatorinset 分割线从边框顶端开始