• 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: "M. Uli Kusterer" <email@hidden>
  • Date: Thu, 25 Sep 2003 18:34:25 +0200

At 14:52 Uhr +0200 25.09.2003, 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.)

This is intentional. The window and many controls in it change their look when they become inactive/active, and this gives them an opportunity to do so.

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.

You might want to look into caching your image. Draw it into an NSImage, and then only draw this NSImage out on drawRect:.
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
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: loadNibNamed:owner: Who disposes of the loaded objects?
  • Next by Date: Re: sudo in NSTask
  • Previous by thread: Re: drawRect auto launch
  • Next by thread: size of the gray bar at the top of an NSWindow
  • Index(es):
    • Date
    • Thread