Join us in building a kind, collaborative learning community via our updatedCode of Conduct.

Questions tagged [nswindow]

an apple class that defines objects that manage and coordinate the windows an application displays on the screen

60
votes
4answers
48k views

How do I create a Cocoa window programmatically?

My Cocoa app needs some small dynamically generated windows. How can I programmatically create Cocoa windows at runtime?This is my non-working attempt so far. I see no result whatsoever.NSRect ...
54
votes
2answers
1k views

NSWindow with NSWindowCollectionBehaviorStationary is visible on the Dashboard. Is this a bug?

I'm trying to get my NSWindow to:Be visible on all SpacesBe visible when showing the Desktop (by pressing F11) Not be visible in Mission Control/ExposeThe following does exactly that, but with a ...
54
votes
2answers
1k views

Unlocking Focus on wrong view ((null)) under OS X 10.7.2

I have a Cocoa app that has an NSWindowController controlling an NSWindow with an NSComboBox in it. Nothing special, and it worked fine until upgrading to OS X 10.7.2. Now I get the following ...
30
votes
2answers
10k views

Keep window always on top?

In Objective-C for Cocoa Apps it's possible to use such way to keep window always on top?How to achieve the same with Swift?self.view.window?.level=NSFloatingWindowLevelCauses build error Use ...
30
votes
4answers
4k views

Unknown Window class (null) in Interface Builder file, creating generic Window instead

My app uses storyboards and the windows have to use a custom class, MyWindow for example, or at runtime/launching the app, there is an error message saying:Unknown Window class (null) in Interface ...
25
votes
2answers
5k views

Why isn't my sheet attached to the window it's run for?

I have a NIB which contains two windows, one is the app's main window visible at launch and the other is a custom sheet (and therefore not visible at launch). When the sheet is required my controller ...
21
votes
5answers
5k views

How to make a smooth, rounded, volume-like OS X window with NSVisualEffectView?

I'm currently trying to make a window that looks like the Volume OS X window:To make this, I have my own NSWindow (using a custom subclass), which is transparent/titlebar-less/shadow-less, that has ...
20
votes
4answers
2k views

Save NSWindow Size on Resize & Close For User

I've noticed that all applications on OS X seem to save the size you set it at. The next time you open it it's typically in the same position and size.I'm making an app and I've noticed that after ...
18
votes
3answers
12k views

How to Change Color of NSWindow Title Bar in OSX

After a Long search regarding the NSWindow title bar color and title color, i have found a easy drawing solution. I posting this to share my knowledge.
17
votes
4answers
20k views

Set NSWindow Size programmatically

How can I set the window size programmatically? I have a window in IB and I want to set the size of it in my code to make it larger.
17
votes
3answers
24k views

How to add an NSView to NSWindow in a Cocoa app?

Since the template of an OS X app in Xcode seems to be similar to an empty app template, the following is used to add a view and a button (trying not to use Interface builder for now):- (void)...
17
votes
10answers
11k views

NSWindow with round corners and shadow

I'm trying to crate a NSWindow without title bar (NSBorderlessWindowMask) with round corners and a shadow, similar to the below "Welcome to Xcode" window.I make a subclass of NSWindow:@...
17
votes
3answers
3k views

Mac OS X Lion: Detect if another application is running in full screen mode?

In a Cocoa app, is there a way to tell if another application currently is in full screen mode?My application is configured to show up on all Spaces and listens for mouseEntered events to order ...
16
votes
7answers
10k views

Allow click and dragging a view to drag the window itself?

I'm using a textured window that has a tab bar along the top of it, just below the title bar.I've used -setContentBorderThickness:forEdge: on the window to make the gradient look right, and to make ...
16
votes
2answers
11k views

How to create modal slide-out window in Mac OS?

How can I create modal slide-out window/view "in-window" at XCode like at these screenshot?I've tried create new Window controller with "Authentication panel style" animation but than I'm receiving ...

153050per page
angop.ao, elkhabar.com, noa.al, afghanpaper.com, bbc.com, time.com, cdc.gov, nih.gov, xnxx.com, github.com,