WalletSpinnerTableViewCell.swift 1.07 KB
//
//  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()
        }
    }
}