I have solved the problem myself.
How you have done this? Can you please give an explanation here? @ muranobu
@twinkalGSensussoft
Hi, Sample code is here.
let cropViewController = CropViewController(image: OriginalImage)
self.addChild(cropViewController)
self.cropContainer.addSubview(cropViewController.view)
cropViewController.view.frame = CGRect(x: self.cropContainer.frame.origin.x, y: self.cropContainer.frame.origin.y, width: self.cropContainer.frame.width, height: self.cropContainer.frame.height)
cropViewController.toolbar.isHidden = true
cropViewController.didMove(toParent: self)
@IBAction func cropDoneButtonTUP(_ sender: UIButton) {
self.cropViewController.toolbar.doneButtonTapped!()
}
What if I don't want only 90-degree rotation?. I want to add a rotation gesture to it, is it possible? If yes then please help me out.
thanks in advance.
Most helpful comment
@twinkalGSensussoft
Hi, Sample code is here.