Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/extensions/Variables/includes/ExtVariables.php on line 198
SpringBoard (Class) - iPhone Development Wiki

SpringBoard (Class)

From iPhone Development Wiki

SpringBoard is the singleton class that manages the SpringBoard application.

Monitoring Orientation of Top App

Whenever the orientation of the top application is changed, -[SpringBoard noteUIOrientationChanged:display:] is called. Therefore, you can hook this method to be notified of the event.

You can also hook SpringBoard's -(void)noteInterfaceOrientationChanged:(int)arg1 duration:(float)arg2

= Orientation

activeInterfaceOrientation shows present orientation interfaceOrientationForCurrentDeviceOrientation shows the device orientation Q: When will these be different? A: If you have the device locked in portrait but a game plays in landscape these values will be different. activeInterfaceOrientation will be in landscape while interfaceOrientationForCurrentDeviceOrientation will still be in the locked portrait.

Sending messages to SpringBoard

Because SpringBoard inherits from UIApplication, you can send messages to it as follows: [[SpringBoard sharedApplication] aMethod]

Getting the top SBApplication

A reference to the top SBApplication may be obtained by using the following method: [[SpringBoard sharedApplication] _accessibilityFrontMostApplication].

References