TOCropViewController icon indicating copy to clipboard operation
TOCropViewController copied to clipboard

Add right button in navigation bar

Open DanielZanchi opened this issue 4 years ago • 0 comments
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.

DanielZanchi avatar Apr 11 '21 20:04 DanielZanchi