Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/110.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 使用avcapturepreviewlayer initwithsessionwithnoconnection时发出信号_Ios_Avcapturesession - Fatal编程技术网

Ios 使用avcapturepreviewlayer initwithsessionwithnoconnection时发出信号

Ios 使用avcapturepreviewlayer initwithsessionwithnoconnection时发出信号,ios,avcapturesession,Ios,Avcapturesession,我正在尝试开发一个应用程序,使用两个AVCaptureVideoPreviewLayer 使用 AVCaptureVideoPreviewLayer *a = [[AVCaptureVideoPreviewLayer alloc] initWithSession:session]; 很好用 然而,使用 AVCaptureVideoPreviewLayer *a = [[AVCaptureVideoPreviewLayer alloc] initWithSessionWithNoConnect

我正在尝试开发一个应用程序,使用两个AVCaptureVideoPreviewLayer

使用

AVCaptureVideoPreviewLayer *a = [[AVCaptureVideoPreviewLayer alloc] initWithSession:session]; 
很好用

然而,使用

AVCaptureVideoPreviewLayer *a = [[AVCaptureVideoPreviewLayer alloc] initWithSessionWithNoConnection:session];
给我一个带有以下信息的SIGABRT:

***由于未捕获的异常“NSInvalidArgumentException”而终止应用程序,原因:'-[AVCaptureVideoPreviewLayer initWithSessionWithNoConnection:]:未识别的选择器发送到实例0x155547e0'

我使用的是XCode版本6.1.1 6A2008a和Mavericks

任何帮助都将不胜感激

///////////////////////////////////////

/*更新*/ 1.斯塔塞尔-谢谢你的格式

我想出来了。 在检查了头文件AVCaptureVideoPreviewLayer.h之后,我想要的initWithSessionWithNoConnection声明仅适用于iOS 8及更高版本

案子解决了!现在我要买一部iphone6