• 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
How to Optimize drawRect: for obscured views?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to Optimize drawRect: for obscured views?


  • Subject: How to Optimize drawRect: for obscured views?
  • From: "E. Wing" <email@hidden>
  • Date: Sat, 11 Nov 2006 17:46:49 -0700

I have a custom view which may have animation. I use an NSTimer to
fire periodically and I check to see if anything is animating in my
view. If so, I call setNeedsDisplay:YES.

If I minimize or hide the application, I notice that drawRect: stops
being called by the system (which I consider good). But if my
view/window is completely obscured by another window (say another
window from my app or from another application such as Safari) , I
noticed that drawRect: is still being called.

Is there a way I can avoid sucking up system resources (by drawing)
when the view is not visible in this manner? (I intend to have lots of
instances of these views in my app, and don't want to overwhelm system
resources by drawing views that may have been buried by other
windows.)

Thanks,
Eric
_______________________________________________
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: How to Optimize drawRect: for obscured views?
      • From: Andrew Farmer <email@hidden>
  • Prev by Date: Re: how to validate toolbar with different target?
  • Next by Date: Re: How to Optimize drawRect: for obscured views?
  • Previous by thread: Re: NSSlider with 2 sliders
  • Next by thread: Re: How to Optimize drawRect: for obscured views?
  • Index(es):
    • Date
    • Thread