我自己解决了这个问题。
你是怎么做到的? 你能在这里解释一下吗? @穆拉诺布
@twinkalGSensussoft
您好,示例代码在这里。
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)
<strong i="29">@IBAction</strong> func cropDoneButtonTUP(_ sender: UIButton) {
self.cropViewController.toolbar.doneButtonTapped!()
}
如果我不想只旋转 90 度怎么办? 我想给它添加一个旋转手势,可以吗? 如果是,那么请帮助我。
提前致谢。
最有用的评论
@twinkalGSensussoft
您好,示例代码在这里。