Created
September 22, 2017 14:58
-
-
Save ericjkunz/5e4b90a7409ad7da4ff55845476445bb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func shouldPerformIntensiveUnecessaryAnimation() -> Bool { | |
return ProcessInfo.processInfo.thermalState != ProcessInfo.ThermalState.critical || | |
!ProcessInfo.processInfo.isLowPowerModeEnabled || | |
!UIAccessibilityIsReduceMotionEnabled() || | |
!(UIDevice.current.batteryLevel < 10 && UIDevice.current.batteryState == .unplugged) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment