I’ve two completely different views
one topCardView
and second is BottomView
.
I set scrollview and GeometryReader and set each views accordingly.
Drawback I’m dealing with is on scrolling the web page freeze and getting an error of Invalid body dimension (unfavourable or non-finite)
Code:
ScrollView(.vertical, showsIndicators: false, content material: {
GeometryReader { reader in
topCardView
.offset(y: -reader.body(in: .world).minY)
.body(width: UIScreen.most important.bounds.width, top: reader.body(in: .world).minY + 500)
}
.body(top: 500)
VStack(spacing: 40) {
BottomView
}
.padding(.vertical, 32)
.padding(.horizontal, 16)
.background(
Coloration(pink: 232/255, inexperienced: 230/255, blue: 225/255)
.cornerRadius(40)
)
.offset(y: -25)
})
Photos: