I have StackViews enclosed in a view and whenever I scroll upwards the view collapses, its height shrinks basically. I want the view to not move when I scroll upwards. How do I do that?
Stackviews In A View
Which view do you scroll ? The container view ?whenever I scroll upwards the view collapses
Which view should not move ?I want the view to not move when I scroll upwards
Please be very explicit in the use case.
Yeah it's like a container view but without a childvc. I don't want the container to move when I scroll. I have a video of the issue but this site is not letting me post it.
When you scroll what ? Inside the stackView ?I don't want the container to move when I scroll.
Would be helpful to post the video elsewhere.
The container view should not move it should be still like the text.
Yes I scroll the container view and I don't want that container to move. Is there any way I can upload images, I think that can make you understand better?
So you want the stackView to stay in place when you scroll the container ? Which means that the stack view will not keep a fixed position relative to container ?
If I understand correctly, you should:
If I understand correctly, you should:
in IB, take the stackView outside the scrollable container (put it at top hierarchical level)
set constraints for stackView relative to the safe area.
Okay so I should not have my stackviews be apart of a container.
Did you solve it ? If so, don't forget to close by marking correct answer.
Have a good day.
Have a good day.
I took my 2 stackviews out of the container but when I have vertical spacing with them to the text it collapses.
This is not enough.I took my 2 stackviews out of the container but when I have vertical spacing with them to the text it collapses.
If you don't explain more clearly, with full details, your set up, what you get and what you expect, it will be very hard to help.