TOCropViewController
TOCropViewController copied to clipboard
Add right button in navigation bar
trafficstars
I am trying to add a right navigation button to crop the image and dismiss the view.
cropViewController.navigationItem.setRightBarButton(UIBarButtonItem(image: UIImage(systemName: "checkmark"), style: .done, target: self, action: #selector(......)), animated: false)
But is there a way to call the:
cropViewController(_ cropViewController: CropViewController, didCropToImage image: UIImage, withRect cropRect: CGRect, angle: Int)
From there?
I am hiding the done button this way:
cropViewController.doneButtonHidden = false
But I obviously need to add an action to the right bar button item.