Re: drawing into a hidden view
Re: drawing into a hidden view
- Subject: Re: drawing into a hidden view
- From: Kyle Sluder <email@hidden>
- Date: Sat, 15 May 2010 12:15:16 -0700
On Sat, May 15, 2010 at 11:50 AM, Shane
<email@hidden> wrote:
> I have nothing in my code that says "if the view is not shown, don't
> draw into it". Anyone have ideas on what's happening?
You need to dissociate drawing from data collection. Your view's
implementation of -drawRect: should simply draw whatever the current
state is. It might be something as simple as this:
- (void)drawRect:(NSRect)dirtyRect {
for (DataPoint *p in [modelObject dataPoints])
[self drawDataPoint:p];
}
--Kyle Sluder
_______________________________________________
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