• 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: drawRect auto launch
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: drawRect auto launch


  • Subject: Re: drawRect auto launch
  • From: j o a r <email@hidden>
  • Date: Thu, 25 Sep 2003 15:22:46 +0200

Just add a BOOL to your view subclass that you can set when it needs to be drawn:

- (void) drawRect: (NSRect) frame
{
if (needsToDraw)
{
needsToDraw = NO;

// Draw
}
}

j o a r

On 2003-09-25, at 14.52, Cyprien wrote:

my app draw a graph in a window. But I find out that the drawRect method of my customview is called every time that the window becomes active or inactive. That is, everytime that his status change. (When I click on another app etc.)

I'm wondering if it's possible that this drawRect method will be called juste once, at the opening of the window... I don't need more and it's slowing down my app.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >drawRect auto launch (From: Cyprien <email@hidden>)

  • Prev by Date: Re: WebView - New Window Problem
  • Next by Date: Re: Is Cocoa+Java considered relevant to the list?
  • Previous by thread: drawRect auto launch
  • Next by thread: Re: drawRect auto launch
  • Index(es):
    • Date
    • Thread