Flatlyn
Flatlyn

Reputation: 2050

iOS Turn off screen iPad

Is there any way to turn off screen and adjust volume on the iPad programmatically? It can be private API as this is for personal use. I know that in iPhone you can use proximity sensor but I don't suppose this method would work on iPad.

Upvotes: 2

Views: 2134

Answers (1)

Siddiqui
Siddiqui

Reputation: 7840

You can use proximityMonitoringEnabled and proximityState to handle screen. Look at comment in this answer.

And there is no way to adjust volume

From developer.apple

Global system volume, including your application's volume, is handled by iPhone OS and is not accessible by applications.

Upvotes: 2

Related Questions