我正在尝试做一个snapchat类似的相机视图,与相机流填充所有的屏幕。func beginSession() { let videoCapture = AVCaptureDeviceInput(device: captureDevice, error: &err)
// Fail silently. Do better in the real world.
print
问题是不稳定(每次更新时在两个大小之间跳跃)仅当我使用它来调整previewLayer大小时transformedMetadataObjectForMetadataObject返回的大小。 if([metadataObject.type isEqualToString:AVMetadataObjectTypeFace]) {
// Take an image of the face and pass to CoreImage fo