Does OS X have an equivalent of [UIView setTransform:] on iOS? I have an NSTextField that I want to rotate 10 degrees. In iOS I’d just use [UILabel setTransform:]. Is there anything equivalent for Cocoa Framework?
frameRotation or frameCenterRotation should do that
You could use the underlying layer and rotate that
myView.wantsLayer = YES;
myView.layer.transform = CATransform3DMakeRotation(angle, 0, 0, 1);
p.s. Remember to import QuartzCore
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With