UIImagePicker cameraOverlayView appears on Retake screen

前端 未结 2 1416
北荒
北荒 2020-12-03 07:54

I am struggling with a problem. I am capturing a video, and i had put an UIImageView with an UIImage in it as the UIImagePicker CameraOverLay. So when the user starts the c

相关标签:
2条回答
  • 2020-12-03 08:21

    For Swift 4, it is:

        NotificationCenter.default.addObserver(forName: NSNotification.Name(rawValue: "_UIImagePickerControllerUserDidCaptureItem"), object:nil, queue:nil, using: { note in
            print("camera did capture")
        })
    
        NotificationCenter.default.addObserver(forName: NSNotification.Name(rawValue: "_UIImagePickerControllerUserDidRejectItem"), object:nil, queue:nil, using: { note in
            print("user pressed Retake")
        })
    
    0 讨论(0)
  • 2020-12-03 08:31

    Solved by signing up to NSNotificationCenter, and listening to @"_UIImagePickerControllerUserDidCaptureItem" and @"_UIImagePickerControllerUserDidRejectItem".

    0 讨论(0)
提交回复
热议问题