be careful with the “global definition”.
if your class must save the user settings, you can use:
for save:
NSUserDefaults *pref = [NSUserDefaults standardUserDefaults];
[pref setBool:YES forKey:@"AudioIsON"];
[pref synchronize];
for reading:
BOOL myBooleanSetting = [[NSUserDefaults standardUserDefaults] boolForKey:@"AudioIsON"];
instead of, is better to learn the delegate and the property.
hope this help you.
solved objective-c – using a boolean value from one class in another class