(Cleaned up) |
Twodayslate (talk | contribs) |
||
Line 5: | Line 5: | ||
== Monitoring Orientation of Top App == | == Monitoring Orientation of Top App == | ||
Whenever the orientation of the top application is changed, <tt>-[SpringBoard noteUIOrientationChanged:display:]</tt> is called. Therefore, you can hook this method to be notified of the event. | Whenever the orientation of the top application is changed, <tt>-[SpringBoard noteUIOrientationChanged:display:]</tt> is called. Therefore, you can hook this method to be notified of the event. | ||
You can also hook SpringBoard's <tt>-(void)noteInterfaceOrientationChanged:(int)arg1 duration:(float)arg2</tt> | |||
== Sending messages to SpringBoard == | == Sending messages to SpringBoard == |
Revision as of 21:16, 8 March 2015
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 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
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
- Header: http://github.com/kennytm/iphone-private-frameworks/blob/master/SpringBoard/SpringBoard-Class.h