Closed Lavmint closed 5 years ago
Hi @Lavmint
This is (most probably) due to the firstItemTransform
property of the custom flowlayout.
Because the card resizes (transforms) once it gets pushed to the background, the contents of the card need to be resized too (this happens at every bounds change, see the shouldInvalidateLayout
function inside VerticalCardSwiperFlowLayout.swift
).
So everything is actually working as intended (including the constraints).
Possible solutions:
firstItemTransform
property of the VerticalCardSwiper
to 0. Although you would lose the effect by doing that.UILabel
or something along those lines.
You might also want to look into content hugging and compression resistance priorities.Hope this helps. 😄
I'll be closing this for now as it's intended behaviour. Feel free to reopen if you have feedback, questions or remarks. 🙂
Best regards Joni
New Issue Checklist
Issue Description
Steps to reproduce:
UIViewController
and addUILabel
inside of it, stretch label to edges with constraintsview
as subview toCardView
, stretch VC'sview
to edges ofCardView
with constraintsEnvironment