• 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
Re: scrolling and drawing porblems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scrolling and drawing porblems


  • Subject: Re: scrolling and drawing porblems
  • From: m <email@hidden>
  • Date: Mon, 6 Nov 2006 15:23:57 -0800


On Nov 6, 2006, at 3:10 PM, Ivan Kourtev wrote:

I have a custom NSView within an NSScrollView and I want an object to draw always at the same position relative to the visible rectangle (not to the bounds). Telling where to draw this object is not a problem (I can get the visible rectangle and so on). The problem is that after scrolling, the argument to drawRect can be just a small rectangle of whatever area was exposed after scrolling. I guess the graphics buffer is reused to paint the rest of the visible rectangle so I end up with "ghost" objects."

(not compiled, written in Mail etc)

In your view's awakeFromNib method:


[[[self enclosingScrollView] contentView] setCopiesOnScroll:NO];

_murat

_______________________________________________
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


References: 
 >scrolling and drawing porblems (From: Ivan Kourtev <email@hidden>)

  • Prev by Date: scrolling and drawing porblems
  • Next by Date: Re: scrolling and drawing porblems
  • Previous by thread: scrolling and drawing porblems
  • Next by thread: Re: scrolling and drawing porblems
  • Index(es):
    • Date
    • Thread