ios - Does UIScreen has notification for screen on? -


i'm trying push notification when screen on, don't know how detect that. if guys know, please tell me, thank you.

the short answer no. (public) notifications associated uiscreen can found in uiscreen class reference:

  • uiscreendidconnectnotification
  • uiscreendiddisconnectnotification
  • uiscreenmodedidchangenotification
  • uiscreenbrightnessdidchangenotification

none of these tell when device wakes up.

however, can implement applicationdidbecomeactive(:) method in app delegate, called when device wakes up. similarly, can implement applicationdidenterbackground(:) method (also in app delegate), called when device goes sleep. note these delegate methods called @ other times (i.e. not when device transitions or sleep). close you're going get. see uiapplicationdelegate protocol reference more information.


Comments

Popular posts from this blog

java - Andrioid studio start fail: Fatal error initializing 'null' -

android - Gradle sync Error:Configuration with name 'default' not found -

StringGrid issue in Delphi XE8 firemonkey mobile app -