• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Move NSPanel using Core Animation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Move NSPanel using Core Animation


  • Subject: Move NSPanel using Core Animation
  • From: Richard Pollock <email@hidden>
  • Date: Thu, 24 Jan 2008 15:52:52 +0000

Is it possible to smoothly slide an NSPanel using Core Animation? I've got the following code in a mouseUp: method using the animator proxy (with the goal of having the bottom left corner of my shiny new HUD NSPanel slide under the mouse):

[[MyNSPanel animator] setFrameOrigin:[MyNSWindow convertBaseToScreen:NSMakePoint([event locationInWindow].x,[event locationInWindow].y)]]

With this code, the panel does move, but doesn't *animate* to its new location. I've searched various places around the net but have only come up with documentation/code for moving NSViews rather than NSWindows. Most of these NSView movements seem to use setFrame: with a modified NSRect origin, but surely that's effectively what setFrameOrigin: is doing to my panel?

(Incidentally, core animation is "working" on the panel, as I've been able to successfully fade it in and out using [[MyNSPanel animator] alpha:x])

Is there perhaps something obvious I'm missing here, like certain window style masks needing to be set or specific window ordering/key status?

Thanks,
Rich
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Move NSPanel using Core Animation
      • From: Troy Stephens <email@hidden>
  • Prev by Date: Re: Core Animation and NSImageView
  • Next by Date: Scaling CGPDFPageRefs
  • Previous by thread: Re: Thanks for your help!
  • Next by thread: Re: Move NSPanel using Core Animation
  • Index(es):
    • Date
    • Thread