Skip to content
Guest Big Announcement

UIAlertView with respring button?

Featured Replies

Solved by castix

  • Solution

- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {

 

NSString *button = [alertView buttonTitleAtIndex:buttonIndex];

 

if([button isEqualToString:@"Respring"])

{

system("killall -9 SpringBoard");

}

}

You know what to do with it hopefully :mellow:

Updated by castix

  • Author

Can i add reboot button and shut dow?

 

#import <UIKit/UIKit.h>

 

%hook SBPowerDownController

 

-(void)orderFront{

UIAlertView *PowerPlus = [[uIAlertView alloc] initWithTitle:@"Power+" message:@"What would you like to do?" delegate:self cancelButtonTitle:@"cancel" otherButtonTitles:@"Respring", nil];

 

[PowerPlus show];

[PowerPlus release];

%orig();

}

 

%new

- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {

NSString *button = [alertView buttonTitleAtIndex:buttonIndex];

 

if([button isEqualToString:@"Respring"])

{

system("killall -9 SpringBoard");

}

}

%end

Create an account or sign in to comment

Featured Content

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.