0
votes

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.

1

1 Answers

1
votes

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]