Programmatically sleep Apple TV on tvos

2019-07-11 17:56发布

问题:

I'd like to have a sleep timer within my own tvos app. Is there a way to enable/disable sleeping on tvos?

I know you disable sleeping using:

[UIApplication sharedApplication].idleTimerDisabled = YES;

But is there a way to then enable sleep right away when a timer finishes?

标签: tvos apple-tv