摘要: + (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 阅读全文
posted @ 2011-08-22 10:36 痴人指路 阅读(426) 评论(0) 推荐(0) 编辑