|
@@ -14,7 +14,7 @@ class TSNightLightVC: TSBaseVC {
|
|
|
lazy var myTimer: TSCustomTimer = {
|
|
|
let customTimer = TSCustomTimer(interval: 1.0,repeats: true) { [weak self] in
|
|
|
guard let self = self else { return }
|
|
|
-
|
|
|
+ debugPrint("countdown=\(setToolView.countdown)")
|
|
|
if setToolView.countdown <= 0{
|
|
|
stopMyTimer()//关闭定时器
|
|
|
isOpen = false
|
|
@@ -56,11 +56,11 @@ class TSNightLightVC: TSBaseVC {
|
|
|
if(setToolView.countdown > 0){
|
|
|
startMyTimer()
|
|
|
}
|
|
|
- setToolView.submitBtn.setTitle("close".localized, for: .normal)
|
|
|
+ setToolView.submitBtn.setTitle("Close".localized, for: .normal)
|
|
|
}else{
|
|
|
UIDevice.allowScreenSleep()
|
|
|
stopMyTimer()
|
|
|
- setToolView.submitBtn.setTitle("open".localized, for: .normal)
|
|
|
+ setToolView.submitBtn.setTitle("Open".localized, for: .normal)
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -113,7 +113,6 @@ class TSNightLightVC: TSBaseVC {
|
|
|
|
|
|
deinit {
|
|
|
UIDevice.allowScreenSleep()
|
|
|
- myTimer.stop()
|
|
|
}
|
|
|
}
|
|
|
|