I’m trying to achieve this:
I have tried rotating it with transform such as:
greenView.transform = CGAffineTransform(rotationAngle: -(.pi/2))
But can’t achieve the desire effect. Can anyone please, let me know on how to properly do this? Thanks
I’m trying to achieve this:
I have tried rotating it with transform such as:
greenView.transform = CGAffineTransform(rotationAngle: -(.pi/2))
But can’t achieve the desire effect. Can anyone please, let me know on how to properly do this? Thanks
Hi @efthemiosprime, have you tried this?
let degrees : Double = -90;
greenView.transform = CGAffineTransform(rotationAngle: CGFloat(degrees * .pi/180))
Best,
Gina
Hi @efthemiosprime,
one thing to note is that most transforms are additive, i.e. start from the last transformation as the start. You can reset it by using the TransformIdentity
cheers,
This topic was automatically closed after 166 days. New replies are no longer allowed.