문제

I have an App that is all day working in the same place and need a way to simulate a sleep mode as best as possible during a range of time.

I thought a simple solution, adding a black view... but sure there are better options. Can I control the brightness of the screen of the device? Any suggestions?

Thanks!

도움이 되었습니까?

해결책

Normally an app that's running but has no user interaction for some period of time causes iOS to go into its own sleep mode. So your app sets that condition to keep the UI active all the time?

If so, sure, add a view to the window and animate it from transparent to full black. Put a gesture recognizer on it so if the user taps it, you animate back into translucent mode, then remove the view.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top