摘要:
+ (BOOL)isHeadphone{//判断耳机是否插入UInt32 propertySize = sizeof(CFStringRef);CFStringRef state = nil;AudioSessionGetProperty(kAudioSessionProperty_AudioRoute,&propertySize,&state);//return @"Headphone" or @"Speaker" and so on.//根据状态判断是否为耳机状态if ([(NSString *)state isEqualToStri 阅读全文