//
//  LLQ_LaunchViewController.swift
//  Scanner
//
//  Created by MAC on 2021/8/10.
//

import UIKit
import PromiseKit
class LLQ_LaunchViewController: LLQ_BaseViewController {
    @IBOutlet weak var iconBGView: UIView!
    @IBOutlet weak var animateIcon: UIImageView!
    
    @IBOutlet weak var iconlogo: UIImageView!
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        self.showNavigationBar = false
        
        iconlogo.layer.cornerRadius = 10
    }
    
    override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
    }
    
    override func viewDidDisappear(_ animated: Bool) {
        super.viewDidDisappear(animated)
        self.animateIcon.layer.removeAllAnimations()
    }

    
    func addAnimation(){
        let ani = CABasicAnimation.init(keyPath: "transform.rotation")
        ani.byValue = Double.pi * 2
        ani.duration = 1
        ani.repeatCount = .infinity
        ani.isRemovedOnCompletion = false
        ani.autoreverses = false
        self.animateIcon.layer.add(ani, forKey: "rotation")
    }

    
}
