You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There seems to be a problem with setting the spacing to a value below 5 when the control is embedded in a UIStackView.
To reproduce this:
Open the demo and delete all the constraints in the main storyboard.
Select all the views and embed them in a stackview.
Constrain the stackview to the edges
Let IB auto-fix the hugging priorities
Select the topmost HCSStarRatingView and set the spacing to something below 5
You will see that the rendering is screwed up in interface builder
Now, when you build and run, it will actually draw correctly in the demo project, but in my own project, it won't, the spacings will be incorrect. I'm not entirely sure if this is really a problem on my side, but I think it's got something to do with the way intrinsicContentSize is calculated. Since you're pinning the height to 44, the spacing will always be incorrect when you constrain the view to a different height.
The text was updated successfully, but these errors were encountered:
From my experience, UIStackView should be doing the right thing (which is why it works in the demo project 😆).
Have you checked your constraints and content compression resistance priority? If something else inside the stack view has a higher CCRP than the rating view bad stuff might happen 😜
Hi @avf, I have the same problem when embedded in UIStackView. My solution was add an aspect ratio constraint to the view and the spacing problem was fixed.
There seems to be a problem with setting the
spacing
to a value below 5 when the control is embedded in aUIStackView
.To reproduce this:
HCSStarRatingView
and set the spacing to something below 5Now, when you build and run, it will actually draw correctly in the demo project, but in my own project, it won't, the spacings will be incorrect. I'm not entirely sure if this is really a problem on my side, but I think it's got something to do with the way
intrinsicContentSize
is calculated. Since you're pinning the height to 44, the spacing will always be incorrect when you constrain the view to a different height.The text was updated successfully, but these errors were encountered: