Xcode & Swift - Window without title bar but with close, minimize and resize buttons The Next CEO of Stack OverflowHow to replicate NSWindow of AddressBook on OS X Yosemite that has no titlebarHow to hide title bar of NSWindow but close and minimize button should be visible?NSPopUpButton in NSToolbar such annoyingNSWindow Titlebar with close buttontitle&&close button not showAdd Subview to NSWindow TitlebarIs there a system support for HUD-style window with a red close button?How can I disable the close button?Hidden window title with accessory viewHow do I get a titlebar to show programmatically in NSWindow?How to hide title bar of NSWindow but close and minimize button should be visible?python tkinter restore window without title bar

What does this strange code stamp on my passport mean?

Is it reasonable to ask other researchers to send me their previous grant applications?

Why do we say “un seul M” and not “une seule M” even though M is a “consonne”?

Noise during hard braking

Informing employers about my unwillingness to take work laptop home

Does 단비 (sweet rain) have Hanja?

What is Decreasing Arithmetic progression?

Grover's algorithm: number of searches

About implicitly convert type 'int' to 'char', why it is different between `s[i] += s[j]` and `s[i] = s[i]+s[j] `

How can the PCs determine if an item is a phylactery?

May one celebrate April fools day?

Raspberry pi 3 B with Ubuntu 18.04 server arm64: what chip

Compensation for working overtime on Saturdays

Can I use UPS to send my tax returns from abroad to IRS Austin?

Does the direction of correlation matter for Instrumental Variable?

Do I need to write [sic] when including a quotation with a number less than 10 that isn't written out?

Creating a script with console commands

Why did the Drakh emissary look so blurred in S04:E11 "Lines of Communication"?

How can I force the size of an int for debugging purposes?

What are the unusually-enlarged wing sections on this P-38 Lightning?

Does the Idaho Potato Commission associate potato skins with healthy eating?

Is the offspring between a demon and a celestial possible? If so what is it called and is it in a book somewhere?

How to find out why iTerm2 suddenly wants to access my Calendar?

Is it "wrong" to build Unity games entirely with UI elements VS sprites?



Xcode & Swift - Window without title bar but with close, minimize and resize buttons



The Next CEO of Stack OverflowHow to replicate NSWindow of AddressBook on OS X Yosemite that has no titlebarHow to hide title bar of NSWindow but close and minimize button should be visible?NSPopUpButton in NSToolbar such annoyingNSWindow Titlebar with close buttontitle&&close button not showAdd Subview to NSWindow TitlebarIs there a system support for HUD-style window with a red close button?How can I disable the close button?Hidden window title with accessory viewHow do I get a titlebar to show programmatically in NSWindow?How to hide title bar of NSWindow but close and minimize button should be visible?python tkinter restore window without title bar










37















I am currently using Swift in Xcode 6, Beta 5.
I am trying to remove the title bar, or any visible difference between the title bar and the actual content. If I enable "Unified title and toolbar" in the Attributes Inspector on a Window, nothing visibly happens. I have already left the title out.

When no title is entered, the title bar will still be distinguishable because of the border line and background difference with the rest of the window, separating it from the actual content.





An excellent example would be the current Yosemite, OS X 10.10, Notes app. No title bar is visible or distinguishable, just the Close, Minimise and Resize buttons as seen here.
Screenshot of Notes window



I have searched and visited other posts, but to no to little avail.

Those mentioned hiding the title bar altogether, but I wouldn't know how to manually re-add the Close, Minimise and Resize buttons properly, meaning they would look correct, no actual, sneaky image replacements and connections with the menu bar Close, Minimise and Resize functions.










share|improve this question
























  • Ive got a Question that related to this. How would you put the NSSplitViewController or SourceView under the Control Buttons/titlebar like that in the Image.

    – Ash-Bash32
    Mar 1 '15 at 17:02















37















I am currently using Swift in Xcode 6, Beta 5.
I am trying to remove the title bar, or any visible difference between the title bar and the actual content. If I enable "Unified title and toolbar" in the Attributes Inspector on a Window, nothing visibly happens. I have already left the title out.

When no title is entered, the title bar will still be distinguishable because of the border line and background difference with the rest of the window, separating it from the actual content.





An excellent example would be the current Yosemite, OS X 10.10, Notes app. No title bar is visible or distinguishable, just the Close, Minimise and Resize buttons as seen here.
Screenshot of Notes window



I have searched and visited other posts, but to no to little avail.

Those mentioned hiding the title bar altogether, but I wouldn't know how to manually re-add the Close, Minimise and Resize buttons properly, meaning they would look correct, no actual, sneaky image replacements and connections with the menu bar Close, Minimise and Resize functions.










share|improve this question
























  • Ive got a Question that related to this. How would you put the NSSplitViewController or SourceView under the Control Buttons/titlebar like that in the Image.

    – Ash-Bash32
    Mar 1 '15 at 17:02













37












37








37


34






I am currently using Swift in Xcode 6, Beta 5.
I am trying to remove the title bar, or any visible difference between the title bar and the actual content. If I enable "Unified title and toolbar" in the Attributes Inspector on a Window, nothing visibly happens. I have already left the title out.

When no title is entered, the title bar will still be distinguishable because of the border line and background difference with the rest of the window, separating it from the actual content.





An excellent example would be the current Yosemite, OS X 10.10, Notes app. No title bar is visible or distinguishable, just the Close, Minimise and Resize buttons as seen here.
Screenshot of Notes window



I have searched and visited other posts, but to no to little avail.

Those mentioned hiding the title bar altogether, but I wouldn't know how to manually re-add the Close, Minimise and Resize buttons properly, meaning they would look correct, no actual, sneaky image replacements and connections with the menu bar Close, Minimise and Resize functions.










share|improve this question
















I am currently using Swift in Xcode 6, Beta 5.
I am trying to remove the title bar, or any visible difference between the title bar and the actual content. If I enable "Unified title and toolbar" in the Attributes Inspector on a Window, nothing visibly happens. I have already left the title out.

When no title is entered, the title bar will still be distinguishable because of the border line and background difference with the rest of the window, separating it from the actual content.





An excellent example would be the current Yosemite, OS X 10.10, Notes app. No title bar is visible or distinguishable, just the Close, Minimise and Resize buttons as seen here.
Screenshot of Notes window



I have searched and visited other posts, but to no to little avail.

Those mentioned hiding the title bar altogether, but I wouldn't know how to manually re-add the Close, Minimise and Resize buttons properly, meaning they would look correct, no actual, sneaky image replacements and connections with the menu bar Close, Minimise and Resize functions.







swift cocoa interface-builder osx-yosemite titlebar






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Sep 13 '17 at 17:08









Vadim Kotov

4,82863549




4,82863549










asked Aug 11 '14 at 19:20









IsaiahIsaiah

84741737




84741737












  • Ive got a Question that related to this. How would you put the NSSplitViewController or SourceView under the Control Buttons/titlebar like that in the Image.

    – Ash-Bash32
    Mar 1 '15 at 17:02

















  • Ive got a Question that related to this. How would you put the NSSplitViewController or SourceView under the Control Buttons/titlebar like that in the Image.

    – Ash-Bash32
    Mar 1 '15 at 17:02
















Ive got a Question that related to this. How would you put the NSSplitViewController or SourceView under the Control Buttons/titlebar like that in the Image.

– Ash-Bash32
Mar 1 '15 at 17:02





Ive got a Question that related to this. How would you put the NSSplitViewController or SourceView under the Control Buttons/titlebar like that in the Image.

– Ash-Bash32
Mar 1 '15 at 17:02












7 Answers
7






active

oldest

votes


















3














If you are using storyboard, it's just a simple check box in the Inspector bar.



  1. Select the window from Story Board
    enter image description here


  2. Check the Transparent Title Bar checkbox in the inspector window.


enter image description here



Here's how it looks like in the Story board. It looks the same when you build and run the application.



enter image description here






share|improve this answer
































    44














    The new window style mask NSFullSizeContentViewWindowMask added in OS X 10.10 will do the trick.



    self.window.titleVisibility = NSWindowTitleVisibility.Hidden;
    self.window.titlebarAppearsTransparent = YES;
    self.window.styleMask |= NSFullSizeContentViewWindowMask;


    Release Notes






    share|improve this answer

























    • Current version of Xcode does not compile operator of type |=

      – ixany
      Oct 25 '16 at 8:48







    • 3





      @ixany that is because Swift once again changed the language in a backwards incompatible way :| NSWindoStyleMask is an OptionSet; the current OptionSet documentation is here and the current approach seems to be the insert() method.

      – andlabs
      Oct 25 '16 at 14:01












    • Thank you @andlabs, now it works fine!

      – ixany
      Oct 25 '16 at 22:06


















    18














    For 10.10+, you can use these:



    window.titlebarAppearsTransparent = true
    window.movableByWindowBackground = true


    There was an official sample project for window appearance in Yosemite. You might wanna check it out.






    share|improve this answer























    • Could you link me to the sample project? I cannot find it.

      – Maximilian
      Mar 31 '16 at 2:15











    • @Maximilian sorry it was 2 years ago, I no longer have the link. But the answers here pretty much covered them, even with Swift version.

      – Cai
      Mar 31 '16 at 2:19











    • Ya, I'm trying to figure out how to make a mac app coming from iOS. Can't find much sample code, and none with a storyboard. I can't get a reference to the window. Tried a few different ways, always nil? Edit: Finally got it. Made a window controller and put it in windowDidLoad

      – Maximilian
      Mar 31 '16 at 2:52












    • If I implement titlebarAppearsTransparent it also hides the close and minimize buttons

      – ixany
      Oct 25 '16 at 8:50


















    16














    For Swift 3 :-



    self.window.titleVisibility = .hidden
    self.window.titlebarAppearsTransparent = true
    self.window.styleMask.insert(.fullSizeContentView)





    share|improve this answer


















    • 1





      This seems to half work, I am seeing a line under the area of where the border is meant to be. Anyone know how to remove it?

      – Joseph Williamson
      Nov 3 '17 at 9:46


















    11














    You can use these:



    override func viewDidAppear() 
    super.viewDidAppear()

    self.view.window?.titlebarAppearsTransparent = true
    self.view.window?.movableByWindowBackground = true






    share|improve this answer






























      3














      Update Sept. 2017, taget 10.11:



      override func viewDidAppear() 
      super.viewDidAppear()

      self.view.window?.titleVisibility = .hidden
      self.view.window?.titlebarAppearsTransparent = true
      self.view.window?.styleMask.insert(.fullSizeContentView)






      share|improve this answer

























      • Important thing to use this in VDA.... saved my workday :D

        – Pan Mluvčí
        Dec 6 '18 at 15:36


















      1














      I don't have enough reputation to comment on Ranfei Songs answer, but running on OSX 10.12 the syntax for the titleVisibility is slightly different, instead of this:



      self.window.titleVisibility = NSWindowTitleVisibility.Hidden;


      you'll need to use NSWindowTitleHidden instead, so updating Ranfei's code would result in you need to specify this like this:



      self.window.titleVisibility = NSWindowTitleHidden;
      self.window.titlebarAppearsTransparent = YES;
      self.window.styleMask |= NSFullSizeContentViewWindowMask;





      share|improve this answer























        Your Answer






        StackExchange.ifUsing("editor", function ()
        StackExchange.using("externalEditor", function ()
        StackExchange.using("snippets", function ()
        StackExchange.snippets.init();
        );
        );
        , "code-snippets");

        StackExchange.ready(function()
        var channelOptions =
        tags: "".split(" "),
        id: "1"
        ;
        initTagRenderer("".split(" "), "".split(" "), channelOptions);

        StackExchange.using("externalEditor", function()
        // Have to fire editor after snippets, if snippets enabled
        if (StackExchange.settings.snippets.snippetsEnabled)
        StackExchange.using("snippets", function()
        createEditor();
        );

        else
        createEditor();

        );

        function createEditor()
        StackExchange.prepareEditor(
        heartbeatType: 'answer',
        autoActivateHeartbeat: false,
        convertImagesToLinks: true,
        noModals: true,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: 10,
        bindNavPrevention: true,
        postfix: "",
        imageUploader:
        brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
        contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
        allowUrls: true
        ,
        onDemand: true,
        discardSelector: ".discard-answer"
        ,immediatelyShowMarkdownHelp:true
        );



        );













        draft saved

        draft discarded


















        StackExchange.ready(
        function ()
        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f25250762%2fxcode-swift-window-without-title-bar-but-with-close-minimize-and-resize-but%23new-answer', 'question_page');

        );

        Post as a guest















        Required, but never shown

























        7 Answers
        7






        active

        oldest

        votes








        7 Answers
        7






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        3














        If you are using storyboard, it's just a simple check box in the Inspector bar.



        1. Select the window from Story Board
          enter image description here


        2. Check the Transparent Title Bar checkbox in the inspector window.


        enter image description here



        Here's how it looks like in the Story board. It looks the same when you build and run the application.



        enter image description here






        share|improve this answer





























          3














          If you are using storyboard, it's just a simple check box in the Inspector bar.



          1. Select the window from Story Board
            enter image description here


          2. Check the Transparent Title Bar checkbox in the inspector window.


          enter image description here



          Here's how it looks like in the Story board. It looks the same when you build and run the application.



          enter image description here






          share|improve this answer



























            3












            3








            3







            If you are using storyboard, it's just a simple check box in the Inspector bar.



            1. Select the window from Story Board
              enter image description here


            2. Check the Transparent Title Bar checkbox in the inspector window.


            enter image description here



            Here's how it looks like in the Story board. It looks the same when you build and run the application.



            enter image description here






            share|improve this answer















            If you are using storyboard, it's just a simple check box in the Inspector bar.



            1. Select the window from Story Board
              enter image description here


            2. Check the Transparent Title Bar checkbox in the inspector window.


            enter image description here



            Here's how it looks like in the Story board. It looks the same when you build and run the application.



            enter image description here







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Mar 8 at 18:16

























            answered Mar 8 at 17:42









            FangmingFangming

            12.9k36358




            12.9k36358























                44














                The new window style mask NSFullSizeContentViewWindowMask added in OS X 10.10 will do the trick.



                self.window.titleVisibility = NSWindowTitleVisibility.Hidden;
                self.window.titlebarAppearsTransparent = YES;
                self.window.styleMask |= NSFullSizeContentViewWindowMask;


                Release Notes






                share|improve this answer

























                • Current version of Xcode does not compile operator of type |=

                  – ixany
                  Oct 25 '16 at 8:48







                • 3





                  @ixany that is because Swift once again changed the language in a backwards incompatible way :| NSWindoStyleMask is an OptionSet; the current OptionSet documentation is here and the current approach seems to be the insert() method.

                  – andlabs
                  Oct 25 '16 at 14:01












                • Thank you @andlabs, now it works fine!

                  – ixany
                  Oct 25 '16 at 22:06















                44














                The new window style mask NSFullSizeContentViewWindowMask added in OS X 10.10 will do the trick.



                self.window.titleVisibility = NSWindowTitleVisibility.Hidden;
                self.window.titlebarAppearsTransparent = YES;
                self.window.styleMask |= NSFullSizeContentViewWindowMask;


                Release Notes






                share|improve this answer

























                • Current version of Xcode does not compile operator of type |=

                  – ixany
                  Oct 25 '16 at 8:48







                • 3





                  @ixany that is because Swift once again changed the language in a backwards incompatible way :| NSWindoStyleMask is an OptionSet; the current OptionSet documentation is here and the current approach seems to be the insert() method.

                  – andlabs
                  Oct 25 '16 at 14:01












                • Thank you @andlabs, now it works fine!

                  – ixany
                  Oct 25 '16 at 22:06













                44












                44








                44







                The new window style mask NSFullSizeContentViewWindowMask added in OS X 10.10 will do the trick.



                self.window.titleVisibility = NSWindowTitleVisibility.Hidden;
                self.window.titlebarAppearsTransparent = YES;
                self.window.styleMask |= NSFullSizeContentViewWindowMask;


                Release Notes






                share|improve this answer















                The new window style mask NSFullSizeContentViewWindowMask added in OS X 10.10 will do the trick.



                self.window.titleVisibility = NSWindowTitleVisibility.Hidden;
                self.window.titlebarAppearsTransparent = YES;
                self.window.styleMask |= NSFullSizeContentViewWindowMask;


                Release Notes







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Aug 21 '15 at 8:15









                Chad Scira

                7,43633844




                7,43633844










                answered Apr 17 '15 at 7:52









                Renfei SongRenfei Song

                2,43411728




                2,43411728












                • Current version of Xcode does not compile operator of type |=

                  – ixany
                  Oct 25 '16 at 8:48







                • 3





                  @ixany that is because Swift once again changed the language in a backwards incompatible way :| NSWindoStyleMask is an OptionSet; the current OptionSet documentation is here and the current approach seems to be the insert() method.

                  – andlabs
                  Oct 25 '16 at 14:01












                • Thank you @andlabs, now it works fine!

                  – ixany
                  Oct 25 '16 at 22:06

















                • Current version of Xcode does not compile operator of type |=

                  – ixany
                  Oct 25 '16 at 8:48







                • 3





                  @ixany that is because Swift once again changed the language in a backwards incompatible way :| NSWindoStyleMask is an OptionSet; the current OptionSet documentation is here and the current approach seems to be the insert() method.

                  – andlabs
                  Oct 25 '16 at 14:01












                • Thank you @andlabs, now it works fine!

                  – ixany
                  Oct 25 '16 at 22:06
















                Current version of Xcode does not compile operator of type |=

                – ixany
                Oct 25 '16 at 8:48






                Current version of Xcode does not compile operator of type |=

                – ixany
                Oct 25 '16 at 8:48





                3




                3





                @ixany that is because Swift once again changed the language in a backwards incompatible way :| NSWindoStyleMask is an OptionSet; the current OptionSet documentation is here and the current approach seems to be the insert() method.

                – andlabs
                Oct 25 '16 at 14:01






                @ixany that is because Swift once again changed the language in a backwards incompatible way :| NSWindoStyleMask is an OptionSet; the current OptionSet documentation is here and the current approach seems to be the insert() method.

                – andlabs
                Oct 25 '16 at 14:01














                Thank you @andlabs, now it works fine!

                – ixany
                Oct 25 '16 at 22:06





                Thank you @andlabs, now it works fine!

                – ixany
                Oct 25 '16 at 22:06











                18














                For 10.10+, you can use these:



                window.titlebarAppearsTransparent = true
                window.movableByWindowBackground = true


                There was an official sample project for window appearance in Yosemite. You might wanna check it out.






                share|improve this answer























                • Could you link me to the sample project? I cannot find it.

                  – Maximilian
                  Mar 31 '16 at 2:15











                • @Maximilian sorry it was 2 years ago, I no longer have the link. But the answers here pretty much covered them, even with Swift version.

                  – Cai
                  Mar 31 '16 at 2:19











                • Ya, I'm trying to figure out how to make a mac app coming from iOS. Can't find much sample code, and none with a storyboard. I can't get a reference to the window. Tried a few different ways, always nil? Edit: Finally got it. Made a window controller and put it in windowDidLoad

                  – Maximilian
                  Mar 31 '16 at 2:52












                • If I implement titlebarAppearsTransparent it also hides the close and minimize buttons

                  – ixany
                  Oct 25 '16 at 8:50















                18














                For 10.10+, you can use these:



                window.titlebarAppearsTransparent = true
                window.movableByWindowBackground = true


                There was an official sample project for window appearance in Yosemite. You might wanna check it out.






                share|improve this answer























                • Could you link me to the sample project? I cannot find it.

                  – Maximilian
                  Mar 31 '16 at 2:15











                • @Maximilian sorry it was 2 years ago, I no longer have the link. But the answers here pretty much covered them, even with Swift version.

                  – Cai
                  Mar 31 '16 at 2:19











                • Ya, I'm trying to figure out how to make a mac app coming from iOS. Can't find much sample code, and none with a storyboard. I can't get a reference to the window. Tried a few different ways, always nil? Edit: Finally got it. Made a window controller and put it in windowDidLoad

                  – Maximilian
                  Mar 31 '16 at 2:52












                • If I implement titlebarAppearsTransparent it also hides the close and minimize buttons

                  – ixany
                  Oct 25 '16 at 8:50













                18












                18








                18







                For 10.10+, you can use these:



                window.titlebarAppearsTransparent = true
                window.movableByWindowBackground = true


                There was an official sample project for window appearance in Yosemite. You might wanna check it out.






                share|improve this answer













                For 10.10+, you can use these:



                window.titlebarAppearsTransparent = true
                window.movableByWindowBackground = true


                There was an official sample project for window appearance in Yosemite. You might wanna check it out.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Sep 4 '14 at 0:23









                CaiCai

                2,51321133




                2,51321133












                • Could you link me to the sample project? I cannot find it.

                  – Maximilian
                  Mar 31 '16 at 2:15











                • @Maximilian sorry it was 2 years ago, I no longer have the link. But the answers here pretty much covered them, even with Swift version.

                  – Cai
                  Mar 31 '16 at 2:19











                • Ya, I'm trying to figure out how to make a mac app coming from iOS. Can't find much sample code, and none with a storyboard. I can't get a reference to the window. Tried a few different ways, always nil? Edit: Finally got it. Made a window controller and put it in windowDidLoad

                  – Maximilian
                  Mar 31 '16 at 2:52












                • If I implement titlebarAppearsTransparent it also hides the close and minimize buttons

                  – ixany
                  Oct 25 '16 at 8:50

















                • Could you link me to the sample project? I cannot find it.

                  – Maximilian
                  Mar 31 '16 at 2:15











                • @Maximilian sorry it was 2 years ago, I no longer have the link. But the answers here pretty much covered them, even with Swift version.

                  – Cai
                  Mar 31 '16 at 2:19











                • Ya, I'm trying to figure out how to make a mac app coming from iOS. Can't find much sample code, and none with a storyboard. I can't get a reference to the window. Tried a few different ways, always nil? Edit: Finally got it. Made a window controller and put it in windowDidLoad

                  – Maximilian
                  Mar 31 '16 at 2:52












                • If I implement titlebarAppearsTransparent it also hides the close and minimize buttons

                  – ixany
                  Oct 25 '16 at 8:50
















                Could you link me to the sample project? I cannot find it.

                – Maximilian
                Mar 31 '16 at 2:15





                Could you link me to the sample project? I cannot find it.

                – Maximilian
                Mar 31 '16 at 2:15













                @Maximilian sorry it was 2 years ago, I no longer have the link. But the answers here pretty much covered them, even with Swift version.

                – Cai
                Mar 31 '16 at 2:19





                @Maximilian sorry it was 2 years ago, I no longer have the link. But the answers here pretty much covered them, even with Swift version.

                – Cai
                Mar 31 '16 at 2:19













                Ya, I'm trying to figure out how to make a mac app coming from iOS. Can't find much sample code, and none with a storyboard. I can't get a reference to the window. Tried a few different ways, always nil? Edit: Finally got it. Made a window controller and put it in windowDidLoad

                – Maximilian
                Mar 31 '16 at 2:52






                Ya, I'm trying to figure out how to make a mac app coming from iOS. Can't find much sample code, and none with a storyboard. I can't get a reference to the window. Tried a few different ways, always nil? Edit: Finally got it. Made a window controller and put it in windowDidLoad

                – Maximilian
                Mar 31 '16 at 2:52














                If I implement titlebarAppearsTransparent it also hides the close and minimize buttons

                – ixany
                Oct 25 '16 at 8:50





                If I implement titlebarAppearsTransparent it also hides the close and minimize buttons

                – ixany
                Oct 25 '16 at 8:50











                16














                For Swift 3 :-



                self.window.titleVisibility = .hidden
                self.window.titlebarAppearsTransparent = true
                self.window.styleMask.insert(.fullSizeContentView)





                share|improve this answer


















                • 1





                  This seems to half work, I am seeing a line under the area of where the border is meant to be. Anyone know how to remove it?

                  – Joseph Williamson
                  Nov 3 '17 at 9:46















                16














                For Swift 3 :-



                self.window.titleVisibility = .hidden
                self.window.titlebarAppearsTransparent = true
                self.window.styleMask.insert(.fullSizeContentView)





                share|improve this answer


















                • 1





                  This seems to half work, I am seeing a line under the area of where the border is meant to be. Anyone know how to remove it?

                  – Joseph Williamson
                  Nov 3 '17 at 9:46













                16












                16








                16







                For Swift 3 :-



                self.window.titleVisibility = .hidden
                self.window.titlebarAppearsTransparent = true
                self.window.styleMask.insert(.fullSizeContentView)





                share|improve this answer













                For Swift 3 :-



                self.window.titleVisibility = .hidden
                self.window.titlebarAppearsTransparent = true
                self.window.styleMask.insert(.fullSizeContentView)






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Feb 17 '17 at 19:14









                Jay MehtaJay Mehta

                677713




                677713







                • 1





                  This seems to half work, I am seeing a line under the area of where the border is meant to be. Anyone know how to remove it?

                  – Joseph Williamson
                  Nov 3 '17 at 9:46












                • 1





                  This seems to half work, I am seeing a line under the area of where the border is meant to be. Anyone know how to remove it?

                  – Joseph Williamson
                  Nov 3 '17 at 9:46







                1




                1





                This seems to half work, I am seeing a line under the area of where the border is meant to be. Anyone know how to remove it?

                – Joseph Williamson
                Nov 3 '17 at 9:46





                This seems to half work, I am seeing a line under the area of where the border is meant to be. Anyone know how to remove it?

                – Joseph Williamson
                Nov 3 '17 at 9:46











                11














                You can use these:



                override func viewDidAppear() 
                super.viewDidAppear()

                self.view.window?.titlebarAppearsTransparent = true
                self.view.window?.movableByWindowBackground = true






                share|improve this answer



























                  11














                  You can use these:



                  override func viewDidAppear() 
                  super.viewDidAppear()

                  self.view.window?.titlebarAppearsTransparent = true
                  self.view.window?.movableByWindowBackground = true






                  share|improve this answer

























                    11












                    11








                    11







                    You can use these:



                    override func viewDidAppear() 
                    super.viewDidAppear()

                    self.view.window?.titlebarAppearsTransparent = true
                    self.view.window?.movableByWindowBackground = true






                    share|improve this answer













                    You can use these:



                    override func viewDidAppear() 
                    super.viewDidAppear()

                    self.view.window?.titlebarAppearsTransparent = true
                    self.view.window?.movableByWindowBackground = true







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Jan 15 '15 at 15:51









                    HosseinHossein

                    1,3011626




                    1,3011626





















                        3














                        Update Sept. 2017, taget 10.11:



                        override func viewDidAppear() 
                        super.viewDidAppear()

                        self.view.window?.titleVisibility = .hidden
                        self.view.window?.titlebarAppearsTransparent = true
                        self.view.window?.styleMask.insert(.fullSizeContentView)






                        share|improve this answer

























                        • Important thing to use this in VDA.... saved my workday :D

                          – Pan Mluvčí
                          Dec 6 '18 at 15:36















                        3














                        Update Sept. 2017, taget 10.11:



                        override func viewDidAppear() 
                        super.viewDidAppear()

                        self.view.window?.titleVisibility = .hidden
                        self.view.window?.titlebarAppearsTransparent = true
                        self.view.window?.styleMask.insert(.fullSizeContentView)






                        share|improve this answer

























                        • Important thing to use this in VDA.... saved my workday :D

                          – Pan Mluvčí
                          Dec 6 '18 at 15:36













                        3












                        3








                        3







                        Update Sept. 2017, taget 10.11:



                        override func viewDidAppear() 
                        super.viewDidAppear()

                        self.view.window?.titleVisibility = .hidden
                        self.view.window?.titlebarAppearsTransparent = true
                        self.view.window?.styleMask.insert(.fullSizeContentView)






                        share|improve this answer















                        Update Sept. 2017, taget 10.11:



                        override func viewDidAppear() 
                        super.viewDidAppear()

                        self.view.window?.titleVisibility = .hidden
                        self.view.window?.titlebarAppearsTransparent = true
                        self.view.window?.styleMask.insert(.fullSizeContentView)







                        share|improve this answer














                        share|improve this answer



                        share|improve this answer








                        edited Sep 2 '17 at 10:50

























                        answered Sep 2 '17 at 10:11









                        Andrej JurkinAndrej Jurkin

                        1,397514




                        1,397514












                        • Important thing to use this in VDA.... saved my workday :D

                          – Pan Mluvčí
                          Dec 6 '18 at 15:36

















                        • Important thing to use this in VDA.... saved my workday :D

                          – Pan Mluvčí
                          Dec 6 '18 at 15:36
















                        Important thing to use this in VDA.... saved my workday :D

                        – Pan Mluvčí
                        Dec 6 '18 at 15:36





                        Important thing to use this in VDA.... saved my workday :D

                        – Pan Mluvčí
                        Dec 6 '18 at 15:36











                        1














                        I don't have enough reputation to comment on Ranfei Songs answer, but running on OSX 10.12 the syntax for the titleVisibility is slightly different, instead of this:



                        self.window.titleVisibility = NSWindowTitleVisibility.Hidden;


                        you'll need to use NSWindowTitleHidden instead, so updating Ranfei's code would result in you need to specify this like this:



                        self.window.titleVisibility = NSWindowTitleHidden;
                        self.window.titlebarAppearsTransparent = YES;
                        self.window.styleMask |= NSFullSizeContentViewWindowMask;





                        share|improve this answer



























                          1














                          I don't have enough reputation to comment on Ranfei Songs answer, but running on OSX 10.12 the syntax for the titleVisibility is slightly different, instead of this:



                          self.window.titleVisibility = NSWindowTitleVisibility.Hidden;


                          you'll need to use NSWindowTitleHidden instead, so updating Ranfei's code would result in you need to specify this like this:



                          self.window.titleVisibility = NSWindowTitleHidden;
                          self.window.titlebarAppearsTransparent = YES;
                          self.window.styleMask |= NSFullSizeContentViewWindowMask;





                          share|improve this answer

























                            1












                            1








                            1







                            I don't have enough reputation to comment on Ranfei Songs answer, but running on OSX 10.12 the syntax for the titleVisibility is slightly different, instead of this:



                            self.window.titleVisibility = NSWindowTitleVisibility.Hidden;


                            you'll need to use NSWindowTitleHidden instead, so updating Ranfei's code would result in you need to specify this like this:



                            self.window.titleVisibility = NSWindowTitleHidden;
                            self.window.titlebarAppearsTransparent = YES;
                            self.window.styleMask |= NSFullSizeContentViewWindowMask;





                            share|improve this answer













                            I don't have enough reputation to comment on Ranfei Songs answer, but running on OSX 10.12 the syntax for the titleVisibility is slightly different, instead of this:



                            self.window.titleVisibility = NSWindowTitleVisibility.Hidden;


                            you'll need to use NSWindowTitleHidden instead, so updating Ranfei's code would result in you need to specify this like this:



                            self.window.titleVisibility = NSWindowTitleHidden;
                            self.window.titlebarAppearsTransparent = YES;
                            self.window.styleMask |= NSFullSizeContentViewWindowMask;






                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Jan 5 '17 at 20:37









                            Jeff U.Jeff U.

                            2411211




                            2411211



























                                draft saved

                                draft discarded
















































                                Thanks for contributing an answer to Stack Overflow!


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid


                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.

                                To learn more, see our tips on writing great answers.




                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function ()
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f25250762%2fxcode-swift-window-without-title-bar-but-with-close-minimize-and-resize-but%23new-answer', 'question_page');

                                );

                                Post as a guest















                                Required, but never shown





















































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown

































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown







                                Popular posts from this blog

                                Identity Server 4 is not redirecting to Angular app after login2019 Community Moderator ElectionIdentity Server 4 and dockerIdentityserver implicit flow unauthorized_clientIdentityServer Hybrid Flow - Access Token is null after user successful loginIdentity Server to MVC client : Page Redirect After loginLogin with Steam OpenId(oidc-client-js)Identity Server 4+.NET Core 2.0 + IdentityIdentityServer4 post-login redirect not working in Edge browserCall to IdentityServer4 generates System.NullReferenceException: Object reference not set to an instance of an objectIdentityServer4 without HTTPS not workingHow to get Authorization code from identity server without login form

                                2005 Ahvaz unrest Contents Background Causes Casualties Aftermath See also References Navigation menue"At Least 10 Are Killed by Bombs in Iran""Iran"Archived"Arab-Iranians in Iran to make April 15 'Day of Fury'"State of Mind, State of Order: Reactions to Ethnic Unrest in the Islamic Republic of Iran.10.1111/j.1754-9469.2008.00028.x"Iran hangs Arab separatists"Iran Overview from ArchivedConstitution of the Islamic Republic of Iran"Tehran puzzled by forged 'riots' letter""Iran and its minorities: Down in the second class""Iran: Handling Of Ahvaz Unrest Could End With Televised Confessions""Bombings Rock Iran Ahead of Election""Five die in Iran ethnic clashes""Iran: Need for restraint as anniversary of unrest in Khuzestan approaches"Archived"Iranian Sunni protesters killed in clashes with security forces"Archived

                                Can't initialize raids on a new ASUS Prime B360M-A motherboard2019 Community Moderator ElectionSimilar to RAID config yet more like mirroring solution?Can't get motherboard serial numberWhy does the BIOS entry point start with a WBINVD instruction?UEFI performance Asus Maximus V Extreme