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.69k stars 937 forks source link

Back Button is not hiding when presenting CropViewController #587

Open dimpy-iroid opened 1 month ago

dimpy-iroid commented 1 month ago

Describe the bug I'm presenting CropViewController and Back Button is not getting hidden.

To Reproduce

let cropViewController = CropViewController(image: obj.image ?? UIImage())
                cropViewController.hidesNavigationBar = true
                cropViewController.navigationItem.hidesBackButton = true
                cropViewController.navigationController?.navigationBar.isHidden = true
                    let width = screenWidth/9
                if self.isFromCollection {
                    cropViewController.customAspectRatio = CGSize(width: width*7, height: self.selectedImagesCollectionView.frame.height/1.5)
                } else {
                    cropViewController.customAspectRatio = CGSize(width: width*9, height: width*16)
                }

                    cropViewController.delegate = self
                    cropViewController.resetButtonHidden = true
                    cropViewController.rotateButtonsHidden = true
                    cropViewController.rotateClockwiseButtonHidden = true
                    cropViewController.aspectRatioPickerButtonHidden = true
                    cropViewController.aspectRatioLockEnabled = true
                    cropViewController.aspectRatioLockDimensionSwapEnabled = false
                    cropViewController.resetAspectRatioEnabled = false

                    self.present(cropViewController, animated: true, completion: nil)

Expected behavior I want to hide the navigation bar when I'm presenting CropViewController.

Screenshots Simulator Screenshot - iPhone 15 Pro - 2024-07-05 at 17 20 06

https://github.com/TimOliver/TOCropViewController/assets/130362429/9f456bdd-fb3a-44c9-827e-b7bd6cb33fbb

iOS Device: