Closed AnthonyMDev closed 10 years ago
Let's try using less than or equal
constraints for both width
and height
instead.
This may actually work better than setting the width
constraint as an outlet... let's see where it goes. :]
Looks like width
constraint still needs to be set as an outlet. However, less than or equal
constraint for height
seems to work great- no outlet needed.
So, let's leave the width
constraint as an outlet and just set less than or equal
constraint for height
, if you want the main
or secondary
image view(s) to behavior such way.
Closing this issue as this solution seems to work well.
When using ALMenuCell, I've noticed that if I have a cell that does not have either a main or secondary image, and only one line of text, the cell does not vertically compress because of the height constraint on the image views. By setting the height constraint to 0 in 'setMainImageViewConstraintsToZero' and 'setSecondaryImageViewConstraintsToZero' I am able to correct this problem.
Is there any reason as to why the height constraint was not initially set up this way? Would you like me to put in a pull request for this?