WalletSpinnerTableViewCell.swift
1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//
// WalletSpinnerTableViewCell.swift
// SwiftWarplyFramework
//
// Created by Manos Chorianopoulos on 24/10/23.
//
import UIKit
@objc public class WalletSpinnerTableViewCell: UITableViewCell {
@IBOutlet weak var spinner: UIActivityIndicatorView!
public override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
// spinner.color = UIColor(red: 0.05, green: 0.65, blue: 0.00, alpha: 1.00)
spinner.color = UIColor(red: 0.00, green: 0.65, blue: 0.89, alpha: 1.00)
spinner.translatesAutoresizingMaskIntoConstraints = false
spinner.startAnimating()
}
public override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
// This is a fix for spinner stopping its animation when reusing cells
public override func prepareForReuse() {
super.prepareForReuse()
if let spinner = self.spinner {
spinner.startAnimating()
}
}
}