//照相机是否可用
-(BOOL)isCameraAvailable
{
//判断是否支持照相机
NSArray *availableMediaTypes = [UIImagePickerController availableMediaTypesForSourceType:UIImagePickerControllerSourceTypeCamera];
BOOL canTakeVideo = NO;
for(NSString* mediaType in availableMediaTypes)
{
if([mediaType isEqualToString:(NSString*)kUTTypeImage])
{
canTakeVideo = YES;
break;
}
}
return canTakeVideo;
}