Closed michaelstoffer closed 4 years ago
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) { if traitCollection.userInterfaceStyle == .light { print("Light mode") } else { print("Dark mode") } }
let pulseAnimation = CABasicAnimation(keyPath: "opacity") pulseAnimation.duration = 30 pulseAnimation.fromValue = 0 pulseAnimation.toValue = 1 pulseAnimation.timingFunction = CAMediaTimingFunction(name: .easeInEaseOut) pulseAnimation.autoreverses = true pulseAnimation.repeatCount =.greatestFiniteMagnitude self.view.layer.add(pulseAnimation, forKey: nil)
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) { if traitCollection.userInterfaceStyle == .light { print("Light mode") } else { print("Dark mode") } }
let pulseAnimation = CABasicAnimation(keyPath: "opacity") pulseAnimation.duration = 30 pulseAnimation.fromValue = 0 pulseAnimation.toValue = 1 pulseAnimation.timingFunction = CAMediaTimingFunction(name: .easeInEaseOut) pulseAnimation.autoreverses = true pulseAnimation.repeatCount =.greatestFiniteMagnitude self.view.layer.add(pulseAnimation, forKey: nil)