No edit summary |
(Added top app.) |
||
Line 8: | Line 8: | ||
== Sending messages to SpringBoard == | == Sending messages to SpringBoard == | ||
Because SpringBoard inherits UIApplication you can send messages like this: <tt>[[SpringBoard sharedApplication] aMethod]</tt> | Because SpringBoard inherits UIApplication you can send messages like this: <tt>[[SpringBoard sharedApplication] aMethod]</tt> | ||
== Getting the top SBApplication == | |||
You can get a reference to the top SBApplication like so: <tt>[[SpringBoard sharedApplication] _accessibilityFrontMostApplication]</tt>. | |||
== References == | == References == |
Revision as of 21:53, 4 September 2013
This article is about the Objective-C class. For the application, see SpringBoard.app.
SpringBoard is the singleton class that manages the SpringBoard application.
Monitoring Orientation of Top App
Whenever the orientation of the top application may be changed, -[SpringBoard noteUIOrientationChanged:display:] will be called. Therefore, you can hook this method to be notified of this info. The orientation (as angle in degrees) can be received with -[SpringBoard UIOrientation].
Sending messages to SpringBoard
Because SpringBoard inherits UIApplication you can send messages like this: [[SpringBoard sharedApplication] aMethod]
Getting the top SBApplication
You can get a reference to the top SBApplication like so: [[SpringBoard sharedApplication] _accessibilityFrontMostApplication].
References
- Header: http://github.com/kennytm/iphone-private-frameworks/blob/master/SpringBoard/SpringBoard-Class.h