When: Embedding a Image with a symbol effect in a stack view in SwiftUI, and putting this in a List
Actual: The symbols animate when scrolling that item in and out of the view
Expected: The symbol doesn't animate until the value changes.
I have the following code which is boiled down from my actual code where the animating value is a @Model object property (other animations work fine when their animation's value is watching the same property.)
I've boiled it down to the below examples:
The top example works as expected (no symbol animations on scroll)
The bottom example animates the symbols every time they scroll in to view
#Preview {
VStack {
List {
ForEach(1...100, id: \.self) { index in
Image(systemName: "square.3.layers.3d")
.symbolEffect(.bounce, value: index)
}
}
List {
ForEach(1...100, id: \.self) { index in
HStack {
Image(systemName: "square.3.layers.3d")
.symbolEffect(.bounce, value: index)
}
}
}
}
}
This happens on Mac and iOS.
I'm running Xcode 15.3 RC2 but it also happens in Xcode 15.2
I've found this will happen whether embedding in a HStack, VStack or ZStack but seems fine in a Group.
I've tried adding a id() modifier to the HStack to give it an explicit identifier but this doesn't seem to work.
Is there something I'm missing here?
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Created
Throughout the various way across the internet of capturing a screenshot of the entirety of a UIScrollView's contents (not just the clipped viewport), all pieces of code seem to fail and draw the correct size of image but still be clipped to the viewport of the UIScrollView only.
I can't seem to see any official say on this and if it is a bug has existed at least until iOS 13 (and is still in iOS 15)
Does anyone know if this is a known issue (Apple Engineers)?
Most code examples look like this https://stackoverflow.com/a/48590443/1735584
but there are also examples with drawInHierarchy and snapshotView which results in the same thing