- (BOOL) isAirplainMode
{
NSBundle *bundle = [NSBundle bundleWithPath:@"/System/Library/PrivateFrameworks/AppSupport.framework"];
BOOL success = [bundle load];
BOOL airplain = NO;
if(YES == success)
{
Class RadiosPreferences = NSClassFromString(@"RadiosPreferences");
id radioPreferences = [[RadiosPreferences alloc] init];
SEL selector = NSSelectorFromString(@"airplaneMode");
if(YES == [radioPreferences respondsToSelector:selector])
{
airplain = [[radioPreferences valueForKey:@"airplaneMode"] boolValue];
}
}
return airplain;
}
댓글 없음:
댓글 쓰기