草庐IT

imageSampleBuffer

全部标签

camera - 如何将代码 AVFoundation objective c 转换为 Swift?

我在swift中使用AVFoundation来拍照,但我无法将任何功能代码行从objectivec转换为Swift。我的函数代码是:-(void)capImage{//methodtocaptureimagefromAVCaptureSessionvideofeedAVCaptureConnection*videoConnection=nil;for(AVCaptureConnection*connectioninstillImageOutput.connections){for(AVCaptureInputPort*portin[connectioninputPorts]){if([