Guest User

EasySpring.mm

a guest
Sep 2nd, 2016
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #import <Preferences/Preferences.h>
  2.  
  3. @interface EasySpringListController: PSListController {
  4. }
  5. @end
  6.  
  7. @implementation EasySpringListController
  8.  
  9. - (void)alertView:(UIAlertView *)alertView
  10.                    clickedButtonAtIndex:(NSInteger)buttonIndex{
  11.     if (buttonIndex == [alertView cancelButtonIndex]){
  12.      
  13.     }else{
  14.       system("killall -9 SpringBoard");
  15.     }
  16. }
  17.  
  18. - (void)respringDevice
  19. {
  20.     UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"EasySpring Alert"
  21.     message:@"Would you like to Respring your device?"
  22.     delegate:self
  23.     cancelButtonTitle:@"Cancel"
  24.     otherButtonTitles:@"Respring", nil];
  25.    
  26.     [alert show];
  27. }
  28.  
  29. - (void)twitterNav
  30. {
  31.         [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.twitter.com/TheOneAndOnlyCH"]];
  32. }
  33.  
  34. - (void)redditNav
  35. {
  36.         [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.reddit.com/u/rob311"]];
  37. }
  38.  
  39. - (id)specifiers {
  40.         if(_specifiers == nil) {
  41.                 _specifiers = [[self loadSpecifiersFromPlistName:@"EasySpring" target:self] retain];
  42.         }
  43.         return _specifiers;
  44. }
  45. @end
  46.  
  47. // vim:ft=objc
Add Comment
Please, Sign In to add comment