• 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: Bounds questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bounds questions


  • Subject: Re: Bounds questions
  • From: Shawn Erickson <email@hidden>
  • Date: Mon, 13 Nov 2006 07:58:06 -0800

I personally cannot follow the issue you are hitting... The numbers you outlining make little sense given what you state is happening. It may be best if you provide some example code and more information about your application.

Important note for the future... views live in local coordinates which are defined in points while windows and the screen live in a coordinate space defined in pixels. So you must use the provided API to convert between those two coordinate spaces. (see -[NSView convertPoint:fromView:] and friends, -[NSWindow convertScreenToBase:] and friends, etc.).

Some questions that come to mind...

1) Are you playing around with resolution scaling (via Quartz Debug, aka resolution independent displays)?

2) You say you have a view that you set bounds on but views live in windows... so how do you size your window and what type of window is it?

3) Are you attempting to cover the whole display? Did you capture the display or are otherwise hiding the dock and menu bar?

4) Is the view you are sizing the content view of the window or some subview? Can you outline your view hierarchy?

As a guess try something like the following...

NSRect screenFrame = [[window screen] frame];
// assuming your content view and subviews are set to autoresize
// then all you should need to do is the following...
[window setFrame:screenFrame display:YES];

... if not using auto resizing views then you may have to utilize things like -[NSWindow contentRectForFrameRect:] (and the ones I outlined in my second paragraph) to calculate what you need.

-Shawn




_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Re: Bounds questions
      • From: "Aychamo Aychamo" <email@hidden>
References: 
 >Bounds questions (From: "Aychamo Aychamo" <email@hidden>)
 >Re: Bounds questions (From: Scott Stevenson <email@hidden>)
 >Re: Re: Bounds questions (From: "Aychamo Aychamo" <email@hidden>)
 >Re: Bounds questions (From: Scott Stevenson <email@hidden>)
 >Re: Bounds questions (From: "Aychamo Aychamo" <email@hidden>)

  • Prev by Date: Re: MyDocument instance variables, dealloc problems
  • Next by Date: Re: Re: Bounds questions
  • Previous by thread: Re: Bounds questions
  • Next by thread: Re: Re: Bounds questions
  • Index(es):
    • Date
    • Thread