• 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
Re: Views, frames, and bounds
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Views, frames, and bounds (From: DKJ <email@hidden>)
 >Re: Views, frames, and bounds (From: Jamie Hardt <email@hidden>)
 >Re: Views, frames, and bounds (From: DKJ <email@hidden>)

  • Prev by Date: Re: Views, frames, and bounds
  • Next by Date: Re: what do you use to make icons and similar?
  • Previous by thread: Re: Views, frames, and bounds
  • Next by thread: Re: Views, frames, and bounds
  • Index(es):
    • Date
    • Thread