how to detect low power mode in swift