Editing my nib for a document-based Cocoa application, I see that when I have a window or panel selected, Xcode lets me set its “initial position”:
This is separate from the window's Frame, which is above it, so what is this?
What uses the “initial position”, and what do the two pop-up menus and their possible values mean?
When I run my app and my document creates the NSWindowController for this nib (the second of two), the window appears cascaded from the main document window, rather than at the initial position. Is this because my app is document-based (i.e., the “Initial Position” would be used by a window not owned by a document), or is there some other reason?
The initial position is the position in the screen where the window will appear, by default. And the popups control how this position is altered if the user's screen size is different than yours.
Imagine the screen is a giant NSView, and your window is positioned within it. Initial position is the frame origin, and the popups are your autoresizing mask.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With