Questions tagged [nspopover]

NSPopover is a Cocoa control to temporarily show additional info in a popup like window that automatically disappears for user actions not related to the popover.

The NSPopover class was added in OS X 10.7 for tasks like events in the calendar app (see year overview). Apple's documention for the class is here: NSPopover Class Reference.

216 questions
8
votes
0 answers

Prevent status bar NSPopover from activating main window

I'm implementing an NSPopover and having it appear in the status bar by setting it as a custom view. I've set its behavior to Transient, and also added a global event monitor so that when any other application gets focus, the NSPopover goes…
kbhomes
  • 288
  • 2
  • 13
8
votes
1 answer

How to deal with first responder and a NSPopover

I’m trying to replicate the behaviour of the search field in iTunes, for looking up stock symbols and names. Specifically, as you start typing in the search field a popover appears with the filtered items. For the most part I have this working…
Cory
  • 2,302
  • 20
  • 33
8
votes
3 answers

Resize NSPopover after it is shown

I have an NSPopover who's content in an NSView. I create the popover and add the view like this: NSPopover *thePopover = [[NSPopover alloc] init]; [thePopover setContentViewController:myViewController]; I then show the popover and set the…
Chris
  • 1,005
  • 1
  • 13
  • 27
7
votes
2 answers

How to show NSPopover in SwiftUI lifecycle?

I'm trying to show a detachable NSPopover by clicking on a button but I'm stuck. I followed tuts how to show NSPopover but they all around Menubar apps. My AppDelegate looks like this final class AppDelegate: NSObject, NSApplicationDelegate { …
Roman Banks
  • 319
  • 2
  • 14
7
votes
2 answers

NSPopover color invert in Yosemite dark color

I'm using NSPopover, and when I change the system dock color to dark (Yosemite new feature) some elements in my view invert their color. For example some labels changes from black to grey, or text fields background changes from white to black. And…
Mario
  • 2,431
  • 6
  • 27
  • 34
6
votes
0 answers

How can I make NSPopover detach programmatically?

I have a NSPopover that is draggable but I want to make it detach by clicking on a button. Like Bear Notes App.
tzuer
  • 321
  • 4
  • 12
6
votes
2 answers

NSPopover application does not always appear where it should

I am working on an NSPopover application. I am using raywenderlich tutorial as a starting place. The issue I am having is that when the popover opens and the system status bar is closed (such as when using multiple full-screen apps on a laptop) the…
datinc
  • 3,404
  • 3
  • 24
  • 33
6
votes
3 answers

NSPopOver & NSViewController - Drag to resize

I am making a MenuBar app for which I am using NSPopOver. The problem is that NSPopover uses NSViewController as a contentViewController, whose size gets fixed. My requirement is to make the size of NSViewController flexible i.e just like…
Nikhil Lihla
  • 607
  • 6
  • 21
6
votes
4 answers

Force NSPopover to not become first responder with NSTokenField

I'm having a NSTokenField and I'm providing a custom autocompletion inside the popover. Unfortunately as soon as the popover is shown it forces the NSTokenField to resign first responder. Is there a way to show the popover but not to loose the first…
Quxflux
  • 3,133
  • 2
  • 26
  • 46
6
votes
1 answer

Would like to change the opacity for an NSPopover - is it possible?

I have an NSPopover in a Cocoa application, and since Lion - it renders as semi-transparent, so that whatever text fields, tables, etc. that it overlays - these now show through underneath it and it looks really strange. I checked the class…
ciara staggs
  • 329
  • 2
  • 7
5
votes
2 answers

NSTableview inside NSPopover looks different as standalone

I created a class ListView, that is a very simple Tableview. If I instantiate it with IB everything looks fine. The same if I instantiate it programmatically. If I instantiate it programmatically inside a NSPopover, I get a light grey background…
mica
  • 3,898
  • 4
  • 34
  • 62
5
votes
1 answer

How to display an NSMenu embedded in a NSPopover?

Is there a way to have an NSMenu like object displayed as content of a NSPopover? Essentially I'd like to reproduce what macOS Dock does when you right click on an app icon (I don't mind about the dark background here, I'm only interested in having…
ggould75
  • 880
  • 2
  • 14
  • 23
5
votes
1 answer

How to make NSPopover properly follow the mouse pointer and ignore mouse events?

I would like to display an informational NSPopover that tracks the user's mouse cursor. For this, I am using an NSTrackingArea to update the popover's positioningRect whenever the mouseMoved event fires. However, this has two drawbacks: The popover…
MrMage
  • 7,282
  • 2
  • 41
  • 71
5
votes
2 answers

NSPopover wrong position sometimes, in El Capitan

I'm building a little status bar app, when i click the icon it shows a NSPopover. All worked fine till i upgraded to El Capitan. The problem is when i first launch the app, i simulate the status bar icon press automatically because i want to see the…
Cristi Băluță
  • 1,295
  • 15
  • 27
5
votes
0 answers

Automatically showing an NSPopover in NSStatusBar

I've trying to make a NSPopover automatically appear below an icon in the status bar, the first time the user installs my application. Like google drive does: I'm using the exact code mentioned this answer which works perfectly for manually showing…
patrick
  • 380
  • 2
  • 14
1
2
3
14 15