• 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: "Aychamo Aychamo" <email@hidden>
  • Date: Mon, 13 Nov 2006 04:37:42 -0800

Hi Scott,

What method in particular of NSScreen are you referring to?  It seems
to just return info about the current screen, is size, color depth,
etc.  I know I can get the size of the screen with [[NSScreen
mainScreen] frame], but that's not helping me be able to calculate the
amount to scale my view by to get it to fit the current screen.

For instance, as I said, my app is designed at 1280x854 resolution. If
I drop my monitor down to 800x600 resolution and use [- setBoundsSize:
NSMakeSize(2050, 1175)] my app's interface will scale nicely to fit on
the 800x600 screen.

What I can't figure out is why I had to set the bounds to 2050, 1175
to make a 1280x854 screen scale to a 800x600 screen.  I've got all the
numbers written down, and have been trying to do math on them, but I
can't seem to make the connection.

I don't see how NSScreen can help with this calculation.  May you help
make this more clear?

Thank you
AA

On 11/13/06, Scott Stevenson <email@hidden> wrote:

On Nov 13, 2006, at 3:40 AM, Aychamo Aychamo wrote:

> Hmm.  I looked through NSScreen as well, and the only thing that
> looked useful to me was that it can return the size of the screen.
> The problem is I can't figure out how to use that to calculate the
> correct setBoundsSize to send my main view.

Your original email says:

        "I'm trying to find the code necessary to make my app scale to fit the
        current resolution.  So if my app is run on a 800x600 resolution, it
        will scale down to fit that, and it's run on whatever resolution the
        30" monitor uses, it will fit that too."

Given that, it seems NSScreen should do what you want. If not, could
you rephrase the question?

    - Scott
 _______________________________________________
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

_______________________________________________
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: Bounds questions
      • From: Shawn Erickson <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>)

  • Prev by Date: Re: Bounds questions
  • Next by Date: NSSearchField bug not fixed yet?
  • Previous by thread: Re: Bounds questions
  • Next by thread: Re: Bounds questions
  • Index(es):
    • Date
    • Thread