Re: NSView + NSScrollView, not scrolling
Re: NSView + NSScrollView, not scrolling
- Subject: Re: NSView + NSScrollView, not scrolling
- From: Andy Lee <email@hidden>
- Date: Sat, 05 May 2012 12:12:06 -0400
On May 5, 2012, at 3:31 AM, qvacua wrote:
> - (void)drawRect:(NSRect)dirtyRect {
> [[NSColor yellowColor] set];
> NSRectFill([self frame]);
> }
Using [self frame] is a bug. [self frame] returns a rectangle in the *superview's* coordinate system, whereas NSRectFill expects a rectangle in *self's* coordinate system. Does it help if you correct this to NSRectFill([self bounds])?
--Andy
_______________________________________________
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