Jump to content

UIAlertView with respring button?


Go to solution Solved by castix,

7 posts in this topic

Recommended Posts

  • Solution
Posted (edited)


- (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
Posted

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

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines