Thank you for the response!
But your final solution doesn't seem to work. It first requires to add return before GraphCapsule and then it says Generic parameter 'Content' could not be inferred.
Anyway, the solution appeared to be that simple:
ForEach(data.indices, id: \.self) { index in
GraphCapsule(
index: index,
height: proxy.size.height,
range: data[index][keyPath: self.path],
overallRange: overallRange)
.colorMultiply(self.color)
.transition(.slide)
.animation(.ripple(index: index))
}
This one works fine for me (Xcode 11.5, btw).
Anyway, still not clear why the issue appears only after .transition is added and works fine w/o it.
Post
Replies
Boosts
Views
Activity
Any luck with this? I have the same issue — it seems that transition is applied when you toggle the showDetail in HikeView.swift, but then it blocks GraphCapsule from being redrawn — I've added print to the GraphCapsule body and it's not triggered when there is a transition on GraphCapsule initialisation.
That doesn't make any sense and makes me frustrating about my understanding of transitions and animations in SwiftUI.