Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting the initial window size of an app on OS X?

Tags:

I'm using Xcode 7 on Yosemite. I created a new OS X application, and it came with a storyboard. When I launch the app, the app window is tiny.

What is the easiest way to set the default window size when the app launches?

Ideally I'm looking for a storyboard solution, not a programatic solution. However, if one does not exist, then a programatic solution will suffice. I don't want to set the minimum/maximum size of the window; the user should be able to size it as they see fit.

like image 379
Senseful Avatar asked Jul 22 '15 22:07

Senseful


People also ask

How do I change the default window size on a Mac?

All replies. Open the window by double-clicking on the Desktop disk icon. Change the window size to what you want and reposition the window where you want it locate. If you now close the window and re-open the same as earlier, then it should open with your new settings.

How do I make windows remember the file size on a Mac?

Open a Finder window, hold down the option key and resize the window as you wish. Close all Finder windows and next time you open a new one it will remember the size. Meanwhile, you can use an app like Stay to remember and automatically reset the position of any window.


1 Answers

I figured it out...

You need to change the initial View Controller's View (NSView) size to whatever you want in the Size Inspector. You do not need to touch the Window Controller nor the Window.

Important: Don't forget to delete Xcode's derived data; otherwise it will remember the previous value that was used the first time the app was run.

like image 191
Senseful Avatar answered Oct 07 '22 05:10

Senseful