开发者

SetFrameCenterRotation cause movement issues in NSView

开发者 https://www.devze.com 2023-02-03 13:08 出处:网络
I asked the following question one hour ago: Rotating NSImageView cause the NSImageView to scale I found the solution to a rotation issue by rotating the NSView:

I asked the following question one hour ago:

Rotating NSImageView cause the NSImageView to scale

I found the solution to a rotation issue by rotating the NSView:

[self setFrameCenterRotation:-priorResult];
[self setFrameCenterRotation:rot];
[self setNeedsDisplay:YES];

This works just as I want it but when I try to move the NSView by setting the frame:

[self setFrame:CGRectMake(prect.xPos, prect.yPos, prect.w, prect.h)];

The frame won't move correctly. I read about CALayer and Core Animation, but I don't understand it, d开发者_运维技巧oes anyone have a simple solution for my problem?

0

精彩评论

暂无评论...
验证码 换一张
取 消