【发布时间】:2014-05-20 21:59:47
【问题描述】:
我有自定义 UITableViewCell 并管理我的单元格的选择。 When the cell is selected and the checkmark is presented, the cell Content View width shrinks and my labels with trailing constraints move to the left.如何有效避免内容移动?
我不想将约束设置为前导,因为我有灵活的 tableview 宽度并且它们是右对齐的。当我想通过IBOutlets 在代码中更新标签的约束时,我遇到了麻烦,因为我在cellForRow: 中返回了UITableViewCell 的多个子类,并且在尝试在代码中设置约束时didSelectRowAtIndexPath: 出现无法识别的选择器错误。任何优雅的解决方案?谢谢。
【问题讨论】:
标签: ios objective-c uitableview autolayout