Reputation: 614
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?
Upvotes: 4
Views: 1550
Reputation: 56635
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
Upvotes: 4