ios - How to change height of UITableViewCell when constraint changes?
问题描述
My question is related to this one: How to change height Constraint of UIView in UitableviewCell when using UITableViewAutomaticDimension
The solution there does not seem to be working for me.
In the image above i have a simple cell. On tap of cell, i want to change the constraint of the redView to be larger. This should then automatically change the height of the cell.
I already have the height constraint of the cell set to an @IBOutlet and i think i am correctly changing the size of the cell, but it is not working.
Here is my sample app that is not working. Any help? SampleApp - for Xcode 9.3
解决方案
Calling the below will recalculate the heights.
[tableView beginUpdates];
[tableView endUpdates];
推荐阅读
- drupal-9 - 如何在 drupal 9 上安装谷歌分析?
- python - 使用或工具在约束空间中实现无偏随机化
- swiftui - UISearchController 如何从 SwiftUI 激活
- c - 找不到 winsock.c 或 winsock 实现
- api - 路由:使用 URL 路径中的用户名或哈希而不是 id 来识别资源更安全
- c# - 从 XML 标记 C# LINQ 中提取键值
- java - 清除 BottomSheetDialog 的焦点
- python-3.x - Python线程:如何重复调用线程?
- c++ - if( c == (int) c) 是什么意思?
- spring - 如何创建从实体到 dto 的映射器,其中 dto 嵌套在哪里?