TimOliver / TOCropViewController

A view controller for iOS that allows users to crop portions of UIImage objects
http://www.timoliver.com.au/2015/06/21/tocropviewcontroller-an-open-source-image-cropper-for-ios/
MIT License
4.71k stars 938 forks source link

Circular Croping not working on iPad #530

Open Raka231 opened 2 years ago

Raka231 commented 2 years ago

Describe the bug When I use cropViewController on iPad with cropingStyle circular CropViewController delegate method is not calling.

mackworth commented 11 months ago

Just thought I should add that I don't see this problem in my app; CropViewCroppingStyleCircular on iPad seems to call my delegate just fine.

ronak4567 commented 3 months ago

Also I facing issue in Swift No Delegate methods will be call

https://github.com/TimOliver/TOCropViewController/assets/23085409/805bafbd-b26f-450f-9ed4-066971f00bb7

func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) {

        guard let image = (info[UIImagePickerController.InfoKey.originalImage] as? UIImage) else { return }
        let cropController = CropViewController(croppingStyle: .default, image: image)
        //cropController.modalPresentationStyle = .fullScreen
        cropController.delegate = self
        if picker.sourceType == .camera {
            picker.dismiss(animated: true, completion: {
                self.present(cropController, animated: true, completion: nil)
            })
        } else {
            picker.pushViewController(cropController, animated: true)
        }
    }