-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
Hi there,
I have a ZStack containing some images with varying amounts of parallax inside a vertical ScrollView. On launch it all appears fine, however if I scroll up and down a few times one of the parallax layers (or the outer ZStack) seems to shrink randomly.
But ends up looking like this:

Also sometimes it fixes itself and pops back to the original size, other times it stays in that shrunken state.
Any ideas what may be causing this? Here is the code for reference:
ScrollView(.vertical, showsIndicators: false) {
VStack(spacing: 0) {
ZStack {
Image("Background")
.resizable()
.aspectRatio(contentMode: .fit)
.parallax(amount: 16)
.frame(width: 130)
.padding()
Rectangle()
.frame(width: 130, height: 130)
.foregroundColor(.clear)
.padding()
Image("BorderLayer")
.resizable()
.aspectRatio(contentMode: .fit)
.parallax(amount: 15)
.frame(width: 110)
.padding()
Image("IconLayer")
.resizable()
.aspectRatio(contentMode: .fit)
.parallax(amount: 10)
.frame(width: 75)
.padding()
}
...
Any help would be much appreciated! Thanks a lot
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
