Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #import <Preferences/Preferences.h>
- @interface EasySpringListController: PSListController {
- }
- @end
- @implementation EasySpringListController
- - (void)alertView:(UIAlertView *)alertView
- clickedButtonAtIndex:(NSInteger)buttonIndex
- {
- if (buttonIndex == 0)
- {
- //Do nothing
- }
- else if (buttonIndex == 1 && alertView.tag == 1)
- {
- system("killall -9 SpringBoard");
- }
- else if (buttonIndex == 1 && alertView.tag == 2)
- {
- system("reboot");
- }
- else if (buttonIndex == 1 && alertView.tag == 3)
- {
- system("killall -SEGV SpringBoard");
- }
- else if (buttonIndex == 1 && alertView.tag == 4)
- {
- system("uicache");
- system("killall -9 SpringBoard");
- }
- }
- - (void)respringDevice
- {
- UIAlertView *respringAlert = [[UIAlertView alloc] initWithTitle:@"EasySpring Alert"
- message:@"Would you like to Respring your device?"
- delegate:self
- cancelButtonTitle:@"Cancel"
- otherButtonTitles:@"Respring", nil];
- //respringAlert.tag = 1;
- [respringAlert show];
- }
- - (void)rebootDevice
- {
- UIAlertView *rebootAlert = [[UIAlertView alloc] initWithTitle:@"EasySpring Alert"
- message:@"Would you like to Reboot your device?"
- delegate:self
- cancelButtonTitle:@"Cancel"
- otherButtonTitles:@"Reboot", nil];
- //rebootAlert.tag = 2;
- [rebootAlert show];
- }
- - (void)safeMode
- {
- UIAlertView *safeAlert = [[UIAlertView alloc] initWithTitle:@"EasySpring Alert"
- message:@"Would you like to enter safemode?"
- delegate:self
- cancelButtonTitle:@"Cancel"
- otherButtonTitles:@"Enter SafeMode", nil];
- //safeAlert.tag = 3;
- [safeAlert show];
- }
- - (void)clearCache
- {
- UIAlertView *cacheAlert = [[UIAlertView alloc] initWithTitle:@"EasySpring Alert"
- message:@"Would you like to clear UICache?"
- delegate:self
- cancelButtonTitle:@"Cancel"
- otherButtonTitles:@"Clear UICache", nil];
- //cacheAlert.tag = 4;
- [cacheAlert show];
- }
- - (void)twitterNav
- {
- [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.twitter.com/ioschrisharris"]];
- }
- - (void)paypalNav
- {
- [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=VU58K2NHRLK22"]];
- }
- - (void)redditNav
- {
- [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.reddit.com/u/rob311"]];
- }
- - (void)redditNavTwo
- {
- [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.reddit.com/u/jontelang"]];
- }
- - (id)specifiers {
- if(_specifiers == nil) {
- _specifiers = [[self loadSpecifiersFromPlistName:@"EasySpring" target:self] retain];
- }
- return _specifiers;
- }
- @end
- // vim:ft=objc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement