Вот POC:
Код: Выделить всё
struct POCNavigationStackBehavior: View {
@State private var animating = false
var body: some View {
NavigationStack {
VStack {
RoundedRectangle(cornerRadius: 15.0)
.fill(.quaternary)
.padding(.horizontal)
.frame(height: 200)
.opacity(animating ? 0.3 : 1)
.animation(.easeInOut(duration: 0.75).repeatForever(), value: animating)
.onAppear {
animating.toggle()
}
}
}
}
}
Подробнее здесь: https://stackoverflow.com/questions/786 ... properties
Мобильная версия