• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Full screen tiny issue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Full screen tiny issue


  • Subject: Re: Full screen tiny issue
  • From: Nicholas Buratovich <email@hidden>
  • Date: Tue, 27 Jun 2006 12:28:24 -0700

Tue, 27 Jun 2006 07:20:15 -0400 Bobby B <email@hidden> wrote:

I'm trying to get my app to run full screen.  I want the title bar and
menu bar to go away.  This works well:

SetSystemUIMode(kUIModeAllHidden, nil);

My windows, in Interface Builder, are all locked in at 0,0. However,
when I run the app, there is a tiny gap (about 4 pixels) underneath
the bottom of the window and the actual bottom of the scren (eg, you
can see the background wallpaper under the window)

Do you know what may be causing this?


You will see this behavior in other situations. If you turn on Dock hiding, go into TextEdit (and most other basic apps), and zoom the window to fullscreen you will also see the 4 pixel gap appear.

What you need to do is create an NSWindow subclass and set your window's subclass to it. In the subclass override constrainFrameRect:toScreen: and have it return whatever rect you want when you go into fullscreen mode (probably the size of the screen in your case). Your window can now oversize the 4 pixel boundary and whatever other size limits you find.

If the window can be used while not in fullscreen mode you should rely on the superclass behavior in that situation. You can create a boolean for the window subclass, set it when you enter and exit fullscreen, check to see if it is set in constrainFrameRect:toScreen:, and return either the superclass rect or your fullscreen rect depending on if you are fullscreen or not.

NSWindow delegate methods like windowWillResize:toSize: seem like they might be a nice alternative to subclassing, but I believe constrainFrameRect:toScreen: ends up getting called anyway so they won't work.

Let me know if this helps.

- Nicholas Buratovich
_______________________________________________
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


  • Prev by Date: Re: Set text color of text field
  • Next by Date: Re: space bar keyboard short cut
  • Previous by thread: Re: Full screen tiny issue
  • Next by thread: Re: Full screen tiny issue
  • Index(es):
    • Date
    • Thread