Re: Bounds questions
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