I've been asked to convert a UITableViewCell
with a height determined by autolayout to, in some cases, a table view cell with zero height. What's the most efficient way to do this? I have tried disabling all autolayout constraints related to vertical positioning and height in the appropriate cases, but I still end up with a non-zero height table view cell and the following message:
2016-06-02 12:36:06.781 [1336:556232] Warning once only: Detected a case where constraints ambiguously suggest a height of zero for a tableview cell's content view. We're considering the collapse unintentional and using standard height instead.
and so I'm getting this:
I saw this issue discussed in an existing highly useful SO post (iOS8 - constraints ambiguously suggest a height of zero), but I already do have have an autolayout constraint to container bottom from a 'spacer view', which is the resolution suggested there. In particular I use a spacer view of 0 height with layout constraints to have 0 distance from the view to top, bottom, and both leading and trailing.
Above you can see the two relevant vertical-related views. I've also checked that everything is wired up to my outlets for when I active/disactivate constraints.
What else should I be troubleshooting here?