• 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
Drawing Efficiency
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Drawing Efficiency


  • Subject: Drawing Efficiency
  • From: Alejandro Rodriguez <email@hidden>
  • Date: Sun, 15 Feb 2009 05:32:27 -0400

Hi,

I have a NSView which hosts a list of NSViews (like an NSTableView with views instead of cells). It works perfectly except when the list starts to grow. When I get too many items resizing become sluggish, and after checking I think it is because it is drawing all the views all the time. So my question is: Is there a way to only draw the visible views? I did the following:

	NSRect vR = [self visibleRect];
	if([self inLiveResize]){
		if(NSEqualRects(vR, NSZeroRect)) {
			return;
		}
	}
//Drawing code

This works for keeping the superview from drawing but it's subviews still redraw making everything slow. How do I keep the subviews from drawing?

Any suggestion is very appreciated.

Regards,

Alejandro
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Drawing Efficiency
      • From: Michael Ash <email@hidden>
  • Prev by Date: Re: Line spacing in NSTextView
  • Next by Date: SHA1 hash depends on calendar system in use?
  • Previous by thread: Fwd: [Bug 68083] [Help Wanted][Variant] Add support for Objective-C
  • Next by thread: Re: Drawing Efficiency
  • Index(es):
    • Date
    • Thread