Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 26th, 2012  |  syntax: None  |  size: 0.76 KB  |  hits: 14  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #import <SpringBoard/SpringBoard.h>
  2. #import <SpringBoard/SBUIController.h>
  3. #import <UIKit/UIKit.h>
  4.  
  5. %class SBUIController;
  6. @interface CrazyStuff : NSObject
  7.  
  8. {
  9.  
  10. }
  11.  
  12. -(void)doCrazyStuff;
  13.  
  14. @end
  15. @implementation CrazyStuff
  16.  
  17. -(void)doCrazyStuff
  18. {
  19.         SBUIController *shared = (SBUIController *)[%c(SBUIController) sharedInstance];
  20.  
  21.         UIWindow *theWindow = [shared window];
  22.  
  23.         theWindow.transform.a += .01;
  24.         theWindow.transform.b += .01;
  25.         theWindow.transform.c += .01;
  26.         theWindow.transform.d += .01;
  27. }
  28.  
  29. @end
  30.  
  31. %hook SpringBoard
  32.  
  33.  
  34. -(void)applicationDidFinishLaunching:(id)application
  35. {
  36.         CrazyStuff* crazy = [[CrazyStuff alloc] init];
  37.         [NSTimer scheduledTimerWithTimeInterval:5 target:crazy selector:@selector(doCrazyStuff) userInfo: nil repeats:YES];
  38. }
  39.  
  40. %end