Created
June 5, 2013 01:34
-
-
Save jontelang/5711037 to your computer and use it in GitHub Desktop.
asd
This file contains hidden or 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 LoadSettings() | |
{ | |
NSMutableDictionary *prefs = [[NSMutableDictionary alloc] initWithContentsOfFile:@"/var/mobile/Library/Preferences/com.jontelang.ncenoughprefs.plist"]; | |
if(prefs){ | |
isEnabled = [[prefs valueForKey:@"isEnabled"] boolValue]; | |
} | |
} | |
%ctor { | |
CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), NULL, (void *)LoadSettings, CFSTR("com.jontelang.ncenoughprefs/settingschanged"), NULL, CFNotificationSuspensionBehaviorCoalesce); | |
LoadSettings(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment