Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>This is the code I could use under this link that thankfully "trojanfoe" let me know</p> <p><a href="https://stackoverflow.com/questions/8338314/creating-nswindow-in-fullscreen-mode">Creating NSWindow in fullscreen mode</a></p> <p>This is simplified code: </p> <blockquote> <p>Remember that Cocoa does not make @synthesize in AppDelegate.m for default window. You need to add @synthesize window; manually</p> </blockquote> <p>1- first we fill up screenRect with screen size 2- in size inspector set window position to " Fixed from Left" and make any offset needed you must payoff that offset in your code later ( Here I used 10 px of offset and 40px pay off. this resulted in exactly the same window size as Xcode ! <img src="https://i.stack.imgur.com/lwigF.png" alt="enter image description here"></p> <p>3- add this code:</p> <blockquote> <ul> <li><p>(void)applicationDidFinishLaunching:(NSNotification *)aNotification {</p> <p>// set to open in full screen mode:</p> <p>NSRect screenRect;</p> <p>NSSize screenSize;</p> <p>NSArray *screenArray = [NSScreen screens];</p> <p>NSUInteger screenCount = [screenArray count];</p> <p>for (NSUInteger index=0; index &lt; screenCount; index++)</p> <p>{</p> <pre><code>NSScreen *screen = [screenArray objectAtIndex: index]; screenRect = [screen visibleFrame]; </code></pre> <p>}</p> <p>// Now screenRect contain Screen size</p> <p>screenSize.height= screenRect.size.height; screenSize.width= screenRect.size.width;</p> <p>[window setContentSize:screenSize]; }</p></li> </ul> </blockquote> <p><img src="https://i.stack.imgur.com/WkINd.png" alt="enter image description here"></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload