I want to have a easeIn/moveUp animation onAppear for the text information and SF symbols. Thereafter, I want only the SF symbols to scale up and down forever. Currently, I have managed to scale up down forever but when I managed to chain, the easeIn/moveUp animation also repeated itself forever which should only be repeated once when it appears.
This is how my app representation looks like:
I have included a snippet of the pin animation code below:
HStack (spacing: 20) {
Image(systemName: "pin")
.foregroundColor(.red)
.font(.title2)
.padding(.trailing, 5)
.scaleEffect(animationAmount)
.onAppear {
let baseAnimation = Animation.easeInOut(duration: 1)
let repeated = baseAnimation.repeatForever(autoreverses: true)
return withAnimation(repeated) {
self.animationAmount = 1.5
}
}
VStack (alignment: .leading) {
Text("Pin favourites").fontWeight(.semibold)
Text("You can pin your favourite content on all devices")
.foregroundColor(.gray)
}
Spacer()
}//HStack 2
The full code is in the following page: SwiftUI - in sheet have a fixed continue button that is not scrollable