// // Copyright 2021-2024 New Vector Ltd. // // SPDX-License-Identifier: AGPL-3.0-only // Please see LICENSE in the repository root for full details. // import Foundation class ArrowsAnimationView: UIView { private enum Constants { static let numberOfArrows: Int = 3 static let arrowSize: CGSize = CGSize(width: 14, height: 14) static let gradientAnimationKey: String = "gradient" static let gradientRatios: [CGFloat] = [1.0, 0.3, 0.2] } private var gradientLayer: CAGradientLayer! private lazy var gradientAnimation: CABasicAnimation = { let animation = CABasicAnimation(keyPath: "locations") animation.fromValue = [0.0, 0.0, 0.25] animation.toValue = [0.75, 1.0, 1.0] animation.repeatCount = .infinity animation.duration = 1 return animation }() private var theme: Theme = ThemeService.shared().theme private var arrowImageViews: [UIImageView] = [] override init(frame: CGRect) { super.init(frame: frame) setup() } required init?(coder: NSCoder) { super.init(coder: coder) setup() } private func setup() { let arrowImage = Asset.Images.disclosureIcon.image for i in 0..