Skip to content

how to rotate 90° #4

Closed
iOSleep opened this issue Apr 27, 2017 · 2 comments
Closed

how to rotate 90° #4

iOSleep opened this issue Apr 27, 2017 · 2 comments

Comments

@iOSleep
Copy link

iOSleep commented Apr 27, 2017

when i set slider to -90~90 the crop area do not match the image.
wish your help.

@ikorich
Copy link
Member

ikorich commented Apr 27, 2017

Hi @iOSleep , thats very easy:

fileprivate func setupSlider() {
self.angleSlider?.minimumValue = -Float(IGRRadianAngle.toRadians(90))
self.angleSlider?.maximumValue = Float(IGRRadianAngle.toRadians(90))
self.angleSlider?.value = 0.0
}

@IBAction func onChandeAngleSliderValue(_ sender: UISlider) {
let radians: CGFloat = CGFloat(sender.value)
self.changedAngle(value: radians)
}

please see example

@ikorich ikorich closed this as completed Apr 27, 2017
@iOSleep
Copy link
Author

iOSleep commented Apr 28, 2017

...when you rotate to 90/-90, cropMaskView can't change the size.

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

No branches or pull requests

2 participants