Tarek
Tarek

Reputation: 2392

Launching OS X application in screen center

This seems like a very basic question, but I couldn't find the answer anywhere. How do I launch my non-resizable OS X application window in the center of the screen?

Upvotes: 0

Views: 1348

Answers (2)

TheDarkKnight
TheDarkKnight

Reputation: 27621

If you select your top level window, the Size Inspector will show you a screen similar to this

Size Inspector

You can then drag the representation of your window to where you want it to be positioned when launched, or set the specific coordinates.

Upvotes: 2

Sheen Vempeny
Sheen Vempeny

Reputation: 826

You can choose the center position for the window in Interface Builder by choosing the size inspector. Otherwise you can call [window center] in applicationDidFinishLaunching

Upvotes: 2

Related Questions