我有UIViewcontroller
的照片框子视图,我需要在此框内插入相机,我已在网上搜索,我发现AVCaptureVideoPreviewLayer
AVCaptureVideoPreviewLayer * newCaptureVideoPreviewLayer = [[AVCaptureVideoPreviewLayer alloc] initWithSession:session];
[self.view.layer addSublayer:newCaptureVideoPreviewLayer];
和UIImagePickerController
self.picker = [[UIImagePickerController alloc] init];
[self.view addSubview:self.picker.view];
可以提供帮助,但我无法将相机放入包装盒内,我该怎样才能实现这一目标?