Drawing Efficiency
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