mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-06 07:57:42 +02:00
LaunchLoading: Fix animation theming and repeat count.
This commit is contained in:
@@ -20,25 +20,37 @@ import Reusable
|
||||
@objcMembers
|
||||
final class LaunchLoadingView: UIView, NibLoadable, Themable {
|
||||
|
||||
// MARK: - Constants
|
||||
|
||||
private enum LaunchAnimation {
|
||||
static let duration: TimeInterval = 3.0
|
||||
static let repeatCount = Float.greatestFiniteMagnitude
|
||||
}
|
||||
|
||||
// MARK: - Properties
|
||||
|
||||
@IBOutlet private weak var animationView: ElementView!
|
||||
@IBOutlet private weak var activityIndicatorView: UIActivityIndicatorView!
|
||||
private var animationTimeline: Timeline_1!
|
||||
|
||||
// MARK: - Setup
|
||||
|
||||
static func instantiate() -> LaunchLoadingView {
|
||||
let view = LaunchLoadingView.loadFromNib()
|
||||
let timeline = Timeline_1(view: view.animationView, duration: 3)
|
||||
timeline.play()
|
||||
return view
|
||||
}
|
||||
|
||||
override func awakeFromNib() {
|
||||
super.awakeFromNib()
|
||||
|
||||
let animationTimeline = Timeline_1(view: self.animationView, duration: LaunchAnimation.duration, repeatCount: LaunchAnimation.repeatCount)
|
||||
animationTimeline.play()
|
||||
self.animationTimeline = animationTimeline
|
||||
}
|
||||
|
||||
// MARK: - Public
|
||||
|
||||
func update(theme: Theme) {
|
||||
//self.backgroundColor = theme.backgroundColor
|
||||
//self.logoImageView.tintColor = theme.tintColor
|
||||
//self.activityIndicatorView.color = theme.tabBarUnselectedItemTintColor
|
||||
self.backgroundColor = theme.backgroundColor
|
||||
self.animationView.backgroundColor = theme.backgroundColor
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user