Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Circle Shape Cropping #11

Open
JDModi opened this issue May 31, 2017 · 0 comments
Open

Circle Shape Cropping #11

JDModi opened this issue May 31, 2017 · 0 comments

Comments

@JDModi
Copy link

JDModi commented May 31, 2017

How to convert this code for Circle Shape Cropping? i want to need Square and Circle both cropping in it.

let square = UIAlertAction(title: "Square", style: .default) { [unowned self] action in
let ratio: CGFloat = 1.0
// self.cropView?.cropAspectRatio = ratio
if var cropRect = self.cropView?.cropRect {
let width = cropRect.width
cropRect.size = CGSize(width: width, height: width * ratio)
self.cropView?.cropRect = cropRect
}
}
actionSheet.addAction(square)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant