Reputation: 351
Below is a screenshot of the 'Squish' app on the App Store. How am I able to make a window like that, with rounded corners and no separator between the titlebar and content?
The only difference is I want to have a title on the title bar.
So in short, how do make a window like in the image but with a title?
Upvotes: 3
Views: 1304
Reputation: 70113
Create a new NSWindow in Xcode, then create an outlet for it, and set the titlebarAppearsTransparent
property to true
:
@IBOutlet weak var windowBlank: NSWindow!
func applicationDidFinishLaunching(aNotification: NSNotification) {
windowBlank.titlebarAppearsTransparent = true
windowBlank.backgroundColor = NSColor.whiteColor()
}
You also have to enable the Full size content view
checkbox in the Attributes inspector
.
Upvotes: 4