• 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
Avoiding flicker when dropping in a view
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Avoiding flicker when dropping in a view


  • Subject: Avoiding flicker when dropping in a view
  • From: Serge Meynard <email@hidden>
  • Date: Fri, 11 Mar 2005 18:40:56 -0500

Greetings!

I have a custom view that contains various objects, and I have implemented drag-and-drop to allow me to move them around. When I start dragging a selected object, I stop displaying it in my drawRect: method and let the drag-and-drop system handle drawing it in overlay. All this works just fine. The problem comes when I drop the object... The drag-and-drop code removes the overlay BEFORE I get any drop callbacks, and as a result there is an annoying flicker before I get a chance to redraw the object in its new position (which is exactly where the overlay was being displayed only a moment before). Before I fully understood that bit, I had tried a few workarounds, but obviously none of them worked; the best I was able to do was to minimize the flicker's duration.

Before I start considering any seriously inelegant bits of code to work around this problem, does anyone have any (clean) suggestions? Obviously, the point here is to act only when the drop occurs; anything else would invalidate the whole point of the OS managing an overlay for me! And no, I don't want to roll my own drag-and-drop code; the objects can be dragged from one window to another within the app so it's not entirely trivial. If I have to choose, I prefer living with a bit of flickering to reinventing the wheel.

Thanks,

Serge

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Avoiding flicker when dropping in a view
      • From: Serge Meynard <email@hidden>
  • Prev by Date: Re: Is Mac Mini capable to develop cocoa app?
  • Next by Date: Re: Custom view with lots of subviews slows down NSScrollView scrolling
  • Previous by thread: Re: Attributed Strings
  • Next by thread: Re: Avoiding flicker when dropping in a view
  • Index(es):
    • Date
    • Thread