无故事王国
2 天以前 fe460485972623f9ffcd4d29cb956bfddf9c97e3
DolphinEnglishLearnStudent/Moudle/Home/HomeVC.swift
@@ -41,15 +41,36 @@
                }
            }
        }).disposed(by: disposeBag)
        showLaunchImg()
        NotificationCenter.default.rx.notification(UIApplication.didBecomeActiveNotification).take(until: self.rx.deallocated).subscribe(onNext: {[weak self] _ in
            self?.showLaunchImg()
        }).disposed(by: disposeBag)
    }
    private func showLaunchImg(){
        let launchImg = UIImageView(image: UIImage(named: "launchscreen"))
        sceneDelegate?.window?.addSubview(launchImg)
        launchImg.snp.makeConstraints { make in
            make.edges.equalToSuperview()
        }
        UIView.animate(withDuration: 0.6,delay: 2.5) {
            launchImg.alpha = 0
        } completion: { _ in
            launchImg.removeFromSuperview()
        }
    }
    override func viewDidLayoutSubviews() {
        super.viewDidLayoutSubviews()
        view_yearTwo.jq_gradientColor(colorArr: [UIColor(hexString: "#F0F0F0")!.cgColor,UIColor(hexString: "#DDDDDD")!.cgColor], cornerRadius: 15, startPoint: CGPoint(x: 0, y: 0), endPoint: CGPoint(x: 0, y: 1), bounds: view_yearTwo.bounds,locations: [NSNumber(value: 0.35)])
        view_yearThree.jq_gradientColor(colorArr: [UIColor(hexString: "#F0F0F0")!.cgColor,UIColor(hexString: "#DDDDDD")!.cgColor], cornerRadius: 15, startPoint: CGPoint(x: 0, y: 0), endPoint: CGPoint(x: 0, y: 1), bounds: view_yearTwo.bounds,locations: [NSNumber(value: 0.35)])
        view_yearFour.jq_gradientColor(colorArr: [UIColor(hexString: "#F0F0F0")!.cgColor,UIColor(hexString: "#DDDDDD")!.cgColor], cornerRadius: 15, startPoint: CGPoint(x: 0, y: 0), endPoint: CGPoint(x: 0, y: 1), bounds: view_yearTwo.bounds,locations: [NSNumber(value: 0.35)])
//        view_yearTwo.jq_gradientColor(colorArr: [UIColor(hexString: "#F0F0F0")!.cgColor,UIColor(hexString: "#DDDDDD")!.cgColor], cornerRadius: 15, startPoint: CGPoint(x: 0, y: 0), endPoint: CGPoint(x: 0, y: 1), bounds: view_yearTwo.bounds,locations: [NSNumber(value: 0.35)])
//
//        view_yearThree.jq_gradientColor(colorArr: [UIColor(hexString: "#F0F0F0")!.cgColor,UIColor(hexString: "#DDDDDD")!.cgColor], cornerRadius: 15, startPoint: CGPoint(x: 0, y: 0), endPoint: CGPoint(x: 0, y: 1), bounds: view_yearTwo.bounds,locations: [NSNumber(value: 0.35)])
//
//        view_yearFour.jq_gradientColor(colorArr: [UIColor(hexString: "#F0F0F0")!.cgColor,UIColor(hexString: "#DDDDDD")!.cgColor], cornerRadius: 15, startPoint: CGPoint(x: 0, y: 0), endPoint: CGPoint(x: 0, y: 1), bounds: view_yearTwo.bounds,locations: [NSNumber(value: 0.35)])
    }
    @IBAction func listenAction(_ sender: UIButton) {