Reputation: 9132
Just want to rotate NSView (without animation). Layer backed-view (setWantsLayer=YES). Works with opacity, position. But when I try rotate with
[view.layer setValue:[NSNumber numberWithInt:45*M_PI/180] forKeyPath:@"transform.rotation.y"];
Nothings happened.
Upvotes: 0
Views: 337
Reputation: 56625
You are rotating 0 degrees.
45 * π / 180 = 0.785 which as an int
is 0.
Change your NSNumber to a float or double
[NSNumber numberWithFloat:45*M_PI/180]
Upvotes: 1