I have a custom UITableViewCell
that has the following elements:
I want the UIImageView
on the left, and the 2 UILabel
objects stacked one on the other on the right side. Here's what it looks like in the storyboard:
I've got a horizontal UIStackView
. Inside it is the UIImageView
and a vertical UIStackView
.
Here's what the hierarchy looks like:
For some reason, I'm getting warnings on ambiguity for the title and description labels. I've tried to tweak them again and again but I couldn't get it quite right. Any advice is appreciated.
Make the vertical stackview as fill equally
What I would do is to fix aspect ratio or size of image and make horizontal stack view as equally fill
If image size is variable then I would set the content hugging priority of image higher to the vertical stack view so that it displays entire image without cropping and vertical stack view with fill equally.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With