This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "_own_/Preferences5/Preferences.h" | |
@interface PianoPasscodeLogoCell : PSTableCell <PreferencesTableCustomView> { | |
UIImageView *_image; | |
} | |
@end | |
@implementation PianoPasscodeLogoCell | |
- (id)initWithSpecifier:(PSSpecifier *)specifier | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// InstaTogglesWindow interface | |
// | |
@interface InstaTogglesWindow : UIWindow <LAListener> | |
... | |
@end | |
// | |
// InstaTogglesWindow implementation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)activator:(LAActivator *)activator receiveEvent:(LAEvent *)event | |
{ | |
if( self.hidden ) | |
{ | |
labelReferences = [[NSMutableDictionary alloc] init]; | |
[self makeKeyAndVisible]; | |
[self setAlpha:0]; | |
[self buildToggles]; // Contains animations | |
ANIMATE(0.35f,0.0f) [self setAlpha:1]; AND STOP | |
[event setHandled:YES]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)activator:(LAActivator *)activator receiveEvent:(LAEvent *)event | |
{ | |
if( self.hidden ) | |
{ | |
labelReferences = [[NSMutableDictionary alloc] init]; | |
[self makeKeyAndVisible]; | |
[self setAlpha:0]; | |
[self buildToggles]; // Contains animations | |
ANIMATE(0.35f,0.0f) [self setAlpha:1]; AND STOP | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Problem | |
// Creating a 'UIWindow' object in %ctor does not work | |
// | |
// | |
// Solution 1 | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Includes | |
// | |
#import "/Users/jontelang/Files/Development/Flipswitch/FSSwitchPanel.h" | |
#import "Activator/libactivator.h" | |
// | |
// InstaTogglesWindow interface | |
// | |
@interface InstaTogglesWindow : UIWindow <LAListener> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <math.h> | |
%hook SBAwayController | |
@interface UIApplication () | |
- (id)_accessibilityRunningApplications; | |
@end | |
@interface SBStatusBarDataManager | |
+ (id)sharedDataManager; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void sFSSwitchPanelSwitchStateChangedNotification(){ | |
[ITWindow syncTextColors]; | |
} | |
%ctor | |
{ | |
ITListenerObject = [[InstaTogglesListenerObject alloc] init]; | |
[[LAActivator sharedInstance] registerListener:ITListenerObject forName:@"com.jontelang.instatoggles"]; | |
CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), NULL, (CFNotificationCallback)sFSSwitchPanelSwitchStateChangedNotification, (CFStringRef)FSSwitchPanelSwitchStateChangedNotification, NULL, CFNotificationSuspensionBehaviorCoalesce); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>CFBundleDevelopmentRegion</key> <string>English</string> | |
<key>CFBundleIdentifier</key> <string>com.jontelang.instatoggles-template</string> | |
<key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> | |
<key>CFBundlePackageType</key> <string>BNDL</string> | |
<key>CFBundleShortVersionString</key> <string>1.0.0</string> | |
<key>CFBundleSignature</key> <string>????</string> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* | |
* The code below simply returns a corrected frame for an object that has been "thrown" (with a flick | |
* of the finger), and that object is then animated to that frame elsewhere in this case. It also | |
* decides where it should end up based on some variables like if it should be 50% hidden or nog (not | |
* shown in video below). | |
* | |
* You might now think "that's not impressive" and I agree, it is pretty easy code and not even that | |
* pretty. I'll be honest, I don't think I have any code that will blow your mind, I'm not that good |