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
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.
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
add a comment |
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.
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
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
add a comment |
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.
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
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.
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
swift cocoa interface-builder osx-yosemite titlebar
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
add a comment |
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
add a comment |
7 Answers
7
active
oldest
votes
If you are using storyboard, it's just a simple check box in the Inspector bar.
Select the window from Story Board
Check the Transparent Title Bar checkbox in the inspector window.
Here's how it looks like in the Story board. It looks the same when you build and run the application.
add a comment |
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
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 theinsert()
method.
– andlabs
Oct 25 '16 at 14:01
Thank you @andlabs, now it works fine!
– ixany
Oct 25 '16 at 22:06
add a comment |
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.
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 implementtitlebarAppearsTransparent
it also hides the close and minimize buttons
– ixany
Oct 25 '16 at 8:50
add a comment |
For Swift 3 :-
self.window.titleVisibility = .hidden
self.window.titlebarAppearsTransparent = true
self.window.styleMask.insert(.fullSizeContentView)
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
add a comment |
You can use these:
override func viewDidAppear()
super.viewDidAppear()
self.view.window?.titlebarAppearsTransparent = true
self.view.window?.movableByWindowBackground = true
add a comment |
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)
Important thing to use this in VDA.... saved my workday :D
– Pan Mluvčí
Dec 6 '18 at 15:36
add a comment |
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;
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
If you are using storyboard, it's just a simple check box in the Inspector bar.
Select the window from Story Board
Check the Transparent Title Bar checkbox in the inspector window.
Here's how it looks like in the Story board. It looks the same when you build and run the application.
add a comment |
If you are using storyboard, it's just a simple check box in the Inspector bar.
Select the window from Story Board
Check the Transparent Title Bar checkbox in the inspector window.
Here's how it looks like in the Story board. It looks the same when you build and run the application.
add a comment |
If you are using storyboard, it's just a simple check box in the Inspector bar.
Select the window from Story Board
Check the Transparent Title Bar checkbox in the inspector window.
Here's how it looks like in the Story board. It looks the same when you build and run the application.
If you are using storyboard, it's just a simple check box in the Inspector bar.
Select the window from Story Board
Check the Transparent Title Bar checkbox in the inspector window.
Here's how it looks like in the Story board. It looks the same when you build and run the application.
edited Mar 8 at 18:16
answered Mar 8 at 17:42
FangmingFangming
12.9k36358
12.9k36358
add a comment |
add a comment |
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
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 theinsert()
method.
– andlabs
Oct 25 '16 at 14:01
Thank you @andlabs, now it works fine!
– ixany
Oct 25 '16 at 22:06
add a comment |
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
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 theinsert()
method.
– andlabs
Oct 25 '16 at 14:01
Thank you @andlabs, now it works fine!
– ixany
Oct 25 '16 at 22:06
add a comment |
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
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
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 theinsert()
method.
– andlabs
Oct 25 '16 at 14:01
Thank you @andlabs, now it works fine!
– ixany
Oct 25 '16 at 22:06
add a comment |
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 theinsert()
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
add a comment |
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.
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 implementtitlebarAppearsTransparent
it also hides the close and minimize buttons
– ixany
Oct 25 '16 at 8:50
add a comment |
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.
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 implementtitlebarAppearsTransparent
it also hides the close and minimize buttons
– ixany
Oct 25 '16 at 8:50
add a comment |
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.
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.
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 implementtitlebarAppearsTransparent
it also hides the close and minimize buttons
– ixany
Oct 25 '16 at 8:50
add a comment |
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 implementtitlebarAppearsTransparent
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
add a comment |
For Swift 3 :-
self.window.titleVisibility = .hidden
self.window.titlebarAppearsTransparent = true
self.window.styleMask.insert(.fullSizeContentView)
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
add a comment |
For Swift 3 :-
self.window.titleVisibility = .hidden
self.window.titlebarAppearsTransparent = true
self.window.styleMask.insert(.fullSizeContentView)
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
add a comment |
For Swift 3 :-
self.window.titleVisibility = .hidden
self.window.titlebarAppearsTransparent = true
self.window.styleMask.insert(.fullSizeContentView)
For Swift 3 :-
self.window.titleVisibility = .hidden
self.window.titlebarAppearsTransparent = true
self.window.styleMask.insert(.fullSizeContentView)
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
add a comment |
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
add a comment |
You can use these:
override func viewDidAppear()
super.viewDidAppear()
self.view.window?.titlebarAppearsTransparent = true
self.view.window?.movableByWindowBackground = true
add a comment |
You can use these:
override func viewDidAppear()
super.viewDidAppear()
self.view.window?.titlebarAppearsTransparent = true
self.view.window?.movableByWindowBackground = true
add a comment |
You can use these:
override func viewDidAppear()
super.viewDidAppear()
self.view.window?.titlebarAppearsTransparent = true
self.view.window?.movableByWindowBackground = true
You can use these:
override func viewDidAppear()
super.viewDidAppear()
self.view.window?.titlebarAppearsTransparent = true
self.view.window?.movableByWindowBackground = true
answered Jan 15 '15 at 15:51
HosseinHossein
1,3011626
1,3011626
add a comment |
add a comment |
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)
Important thing to use this in VDA.... saved my workday :D
– Pan Mluvčí
Dec 6 '18 at 15:36
add a comment |
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)
Important thing to use this in VDA.... saved my workday :D
– Pan Mluvčí
Dec 6 '18 at 15:36
add a comment |
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)
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)
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
add a comment |
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
add a comment |
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;
add a comment |
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;
add a comment |
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;
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;
answered Jan 5 '17 at 20:37
Jeff U.Jeff U.
2411211
2411211
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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