mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-25 18:35:17 +00:00
read old Logging Enabled value from prefs
This commit is contained in:
parent
808722c4b2
commit
8268d6d381
@ -44,6 +44,12 @@
|
||||
CGRect dummy;
|
||||
self.loggingSwitch = [[UISwitch alloc] initWithFrame:dummy];
|
||||
[loggingSwitch addTarget:self action:@selector(loggingSwitchToggled) forControlEvents:UIControlEventValueChanged];
|
||||
|
||||
// get old value
|
||||
Boolean valid;
|
||||
Boolean loggingOn = CFPreferencesGetAppBooleanValue(CFSTR("Logging"), CFSTR("ch.ringwald.btstack"), &valid);
|
||||
if (!valid) loggingOn = false;
|
||||
loggingSwitch.on = loggingOn;
|
||||
return self;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user