Skip to content

Instantly share code, notes, and snippets.

@hetelek
Created December 29, 2013 23:54
Show Gist options
  • Save hetelek/8176171 to your computer and use it in GitHub Desktop.
Save hetelek/8176171 to your computer and use it in GitHub Desktop.
A tweak (for iOS 7) that allows you to respring your device by swiping the homescreen card up in the app switcher.
#import <substrate.h>
%hook SBAppSliderController
- (BOOL)sliderScroller:(id)scrollingViewController isIndexRemovable:(unsigned int)index
{
return YES;
}
- (void)sliderScroller:(id)scrollingViewController itemWantsToBeRemoved:(unsigned int)index
{
// if it's the homescreen, respring
if (index == 0)
system("killall -9 SpringBoard");
else
%orig;
}
%end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment