좌우로 계속해서 흔들리는 Animation 코드 Rectangle() .frame(width: 100, height: 100) .foregroundColor(.blue) .offset(x: xOffset) .animation(Animation.easeInOut(duration: 0.1).repeatForever(autoreverses: true)) .onAppear { self.xOffset = -10 } 특정 횟수만큼 흔들리도록 하기 위해서는 repeatForever 대신 repeatCount사용.