Re: Views, frames, and bounds
Re: Views, frames, and bounds
- Subject: Re: Views, frames, and bounds
- From: Andy Lee <email@hidden>
- Date: Sun, 19 Oct 2008 10:30:52 -0400
On Oct 19, 2008, at 9:08 AM, DKJ wrote:
That's the first puzzle. Maybe if I can understand what's happening
here, the other puzzles will be resolved too!
Try placing two of your views in the window with different sizes and
positions. Add NSLog statements to your -drawRect: method that print
the bounds and frame:
- (void)drawRect:(NSRect)rect {
NSLog(@"frame: %@", NSStringFromRect([self frame]));
NSLog(@"bounds: %@", NSStringFromRect([self bounds]));
[[NSColor redColor] set];
[NSBezierPath strokeRect:[self bounds]];
}
See if that helps.
--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