iOS 8: UITableViewCell detail text not correctly updating

后端 未结 8 706
有刺的猬
有刺的猬 2020-12-30 02:32

tl;dr: Can I cause the detailTextLabel to have its size updated by the auto layout system in iOS on a value change?

Has anyone else had issues with the detailText l

8条回答
  •  隐瞒了意图╮
    2020-12-30 03:02

    So, I followed this tread and many others. This one lead me to what seems to be the correct answer. I hope this helps others, since this has driven me crazy since iOS 7 / 8 made some sort of changes.

    My answer was to put the normal processing code in viewWillAppear and add this [self.tableview layoutSubviews] instead of [self.tableView reload data]. I think this has to do with Apple making things much more controllable in iOS 7 / 8. I struck upon that idea when reviewing some info on how cells were working.

    Again, I hope this helps others resolve this annoying problem.

提交回复
热议问题