The elements in the attachment cannot add translation.

UI:

Attachment(id: "tooptip") {
                 if isRecording {
                    TooltipView {
                        HStack(spacing: 8) {
                            Image(systemName: "waveform")
                                .font(.title)
                                .frame(minWidth: 100)
                        }
                    }
                    .transition(.opacity.combined(with: .scale))
                 }
            }

Trigger:

Button("Toggle") {
            withAnimation{
                isRecording.toggle()
            }
        }

The above code did not show the animation effect when running. When I use isRecording to drive an element in a common SwiftUI view, there is an animation effect.

The elements in the attachment cannot add translation.
 
 
Q