作者热门文章
- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我收到这个错误,我不知道如何修复它..
WARNING: -[<AVCaptureVideoPreviewLayer: 0xad482c0> isOrientationSupported] is deprecated. Please use AVCaptureConnection's -isVideoOrientationSupported
然而当我看着苹果时documentation它说它是 Mac OS 功能..不是 IOS...所以我有点困惑...期待得到一些答案..谢谢..
最佳答案
一些示例代码也适用于 pre-6.0:
if ([captureVideoPreviewLayer respondsToSelector:@selector(connection)])
{
if ([captureVideoPreviewLayer.connection isVideoOrientationSupported])
{
[captureVideoPreviewLayer.connection setVideoOrientation:self.interfaceOrientation];
}
}
else
{
// Deprecated in 6.0; here for backward compatibility
if ([captureVideoPreviewLayer isOrientationSupported])
{
[captureVideoPreviewLayer setOrientation:self.interfaceOrientation];
}
}
关于iphone - isOrientationSupported 在 IOS 中已弃用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11532337/
我是一名优秀的程序员,十分优秀!