I have a situation that I have been unable to solve for several weeks. Inside a 
view, I am drawing a "box" that shows a "drop down" effect, similar to a 
drawer. So in the "closed" state it is a narrow rectangle, and when it "opens," 
it expands into a larger rectangle, with a "drop-down" effect. The effect is 
created by calling [[self animator]setFrameSize:size]. The result is a nice, 
smooth "drop down" effect, because the top origin position is pinned to the 
same location (using Interface Builder "springs and struts").

However, when the userSpaceScaleFactor for the app is set to some fractional 
value (such as scaling by 1.25), the box is not stable. Instead, the top origin 
visibly "jumps" around by a pixel or two. I am sure this has something to do 
with the rounding of fractional pixels, but I have been unable to solve it. 
Note that this happens only when setting the frame size through the animator 
(because the result is system calls to setFrameSize), and it only jumps around 
if the scale factor is not 1.0. 

I have tried overriding setFrameSize, and setFrameOrigin, attempting 
conversions that seem like they should work---all to no avail. No matter what I 
do, I cannot figure out how to keep the box pinned to the same vertical 
location during the "animation" of the frame.

Anyone have any ideas?
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to