I am getting this error and i have no idea how to fix it..
WARNING: -[<AVCaptureVideoPreviewLayer: 0xad482c0> isOrientationSupported] is deprecated. Please use AVCaptureConnection's -isVideoOrientationSupported
however when I look at the apples documentation it says that it is a Mac OS function.. not IOS... so I am a bit confused... looking forward get some answers.. Thanks..
Some sample code which works on pre-6.0 as well:
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];
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With