NSWindow With IB

  • Hi There,

    Is there any way to create a Window with no title-bar in IB? I want
    one that is only displayed while the app launches like many apps do.
    I create all my windows with IB and I know that I can use
    NSBorderlessWindowMask if I create one programatically but is there
    anyway of doing it in IB as my current window loads with a title bar.
    I don't mind manipulating it with code if I have to.

    Many thanks,

    Phil.
  • On Thu, May 1, 2008 at 4:53 PM, Philip Bridson <philipleebridson...> wrote:
    > I don't mind manipulating it with code if I have to.

    Subclass NSWindow and override
    -initWithContentRect:styleMask:backing:defer to pass your custom
    window mask to super's implementation.  Then in the identity pane of
    IB, set the class of the window to your custom class.  At runtime,
    things should Just Work(TM).

    --Kyle Sluder
  • Why is it that when you get the answer you always wonder why you
    hadn't thought of it yourself? I've done this method so many times
    with other classes but it just didn't occur to me. Never-mind.

    Thank you for your help.

    Phil.

    On 1 May 2008, at 21:58, Kyle Sluder wrote:

    > On Thu, May 1, 2008 at 4:53 PM, Philip Bridson
    > <philipleebridson...> wrote:
    >> I don't mind manipulating it with code if I have to.
    >
    > Subclass NSWindow and override
    > -initWithContentRect:styleMask:backing:defer to pass your custom
    > window mask to super's implementation.  Then in the identity pane of
    > IB, set the class of the window to your custom class.  At runtime,
    > things should Just Work(TM).
    >
    > --Kyle Sluder
previous month may 2008 next month
MTWTFSS
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  
Go to today