Skip to main content
Filter by
Sorted by
Tagged with
1 vote
0 answers
128 views

How to append a popover's triangle to a window of MenuBarExtra element for SwiftUI macOS 15 app? MenuBarExtra's arsenal doesn't have the .popover(..) modifier, however, to apply it to ContentView() is ...
Andy Jazz's user avatar
  • 61k
1 vote
1 answer
120 views

I am working with a SwiftUI List on macOS, and I have a popover view that I need to show from each row. I have an implementation that works but it shows the popover from one fixed point on the row. I ...
Z S's user avatar
  • 7,577
2 votes
0 answers
94 views

I have a macOS SwiftUI menu bar app. I'm trying to figure out how to get rid of this disclosure triangle. The code for the popover is below. private func setupStatusBarItem() { statusBarItem = ...
narner's user avatar
  • 3,221
0 votes
0 answers
50 views

I’m working on a Mac menu bar application and have this working code that opens/closes the window when toggling the menu bar app icon @objc func togglePopover(_ sender: AnyObject?) { if let button ...
narner's user avatar
  • 3,221
1 vote
0 answers
116 views

I have a SwiftUI view with fields that changes according to an object type that is about to be created. Each type has a different amount of fields, what makes the popover size change. I would like to ...
Rafael Bitencourt's user avatar
0 votes
0 answers
51 views

Is it me or there is an bug with NSSlider when it is a subview of an NSPopover view? Here's the code I use: popover = NSPopover.new; popover.contentViewController = NSViewController.new; ...
jeanlain's user avatar
  • 475
0 votes
0 answers
59 views

So I have the following ContentView shows as a popover in the menu bar. func applicationDidFinishLaunching(_ aNotification: Notification) { // Create the SwiftUI view that provides the window ...
Mansidak's user avatar
  • 144
0 votes
1 answer
81 views

I have an NSPopover that I want to resize with animation. In my case, setContentSize works, but without animation (apple says that animation is not guaranteed). I'm investigating the use of ...
jeanlain's user avatar
  • 475
0 votes
1 answer
797 views

Context NB: The question does NOT pertain to iOS I have a Mac app that shows an NSPopover. The content of that popover is an NSHostingView that displays a simple SwiftUI view: struct PopoverView: View ...
Bryan's user avatar
  • 6,035
3 votes
0 answers
58 views

I have a document-based Cocoa (Mac)/Objective-C application. I'm showing a popover on one of the views in my document window's view; the popover contains only an NSTextField, whose target is the first ...
Peter Hosey's user avatar
  • 96.5k
0 votes
1 answer
104 views

I have a macOS menu bar app. I like to know can we prioritize the order that the app shows in the status bar. // // AppDelegate.swift // elmc_midi_deck-macOS // // Created by Jerry Seigle on 6/23/...
jerry seigle's user avatar
2 votes
0 answers
156 views

Is it possible to override the NSWindow of an NSPopover? You can get the window with let window = mypopover.contentViewController.view.window but it seems nowhere present when subclassing NSPopover. ...
flymg's user avatar
  • 675
1 vote
1 answer
275 views

I'm trying to make a menubar app for macOS 12 that shows a popover when the menubar icon is clicked. As you can see from the attached screenshot, I have the popover showing but it's not actually ...
Jacob's user avatar
  • 393
5 votes
1 answer
1k views

I want to increase the icon button of the Menu in SwiftUI for a macOS app, but modifiers such as .imageScale(.large), .resizable(), .scaleEffect(1.2), and changing font doesn't work. image Menu { ...
fuzzzlove's user avatar
  • 353
5 votes
1 answer
2k views

How do I remove the arrow from the NSPopover? Can you give me a hand? AppDelegate: import Cocoa import SwiftUI @main class AppDelegate: NSObject, NSApplicationDelegate { var popover = NSPopover....
Paul's user avatar
  • 4,618
2 votes
2 answers
1k views

I have a popover as seen from the image. I have to make sure that when the screen mode changes, dark mode or light mode, the color of the popover changes. The color is taken from the asset, like this: ...
Paul's user avatar
  • 4,618
8 votes
3 answers
2k views

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 ...
Roman Banks's user avatar
0 votes
1 answer
1k views

As you can see from the image I have a program that should open as menubar, I would like to know if it was possible to add a badge as seen in image two to the menubar, to indicate that there are ...
Paul's user avatar
  • 4,618
0 votes
1 answer
997 views

As you can see from the image I have the menu bar popover which is transparent, I would like it to be a specific color instead. How can I do, can you give me a hand? StatusBarController import AppKit ...
Paul's user avatar
  • 4,618
0 votes
0 answers
470 views

I have a button in an NSWindow that brings up an NSPopover with: popover = NSPopover() popover?.behavior = .applicationDefined popover?.contentViewController = self let myDelegate = MyDelegate() ...
Frank R.'s user avatar
  • 2,400
2 votes
0 answers
144 views

I'm building my macOS app that contains NSPopover with NSTextView inside. If "Look up & data detectors" is active at system preferences, NSTextView will support this functionality ...
Юрий Логинов's user avatar
1 vote
0 answers
38 views

I would like the popup to be transparent except for the arrow and the bottom-most part of it (bottom part is no problem, of course). I have a NSTableView in the middle so far. So in NSPopover I added ...
DevyV's user avatar
  • 15
0 votes
1 answer
244 views

I am writing a MacOS using Swift & SwiftUI. I am really very new to this, but I am a seasoned programmer. The app is a menu bar app with one NSPopover. In the AppDelegate I include: self.popover = ...
Manngo's user avatar
  • 17k
3 votes
1 answer
251 views

I'm currently developing a macOS menubar app and my NSPopover is fairly wide (450 pixels). Because of its width, it clips off screen if the user doesn't have other MenuBar Items taking space (See ...
Jeremy's user avatar
  • 31
1 vote
0 answers
511 views

I'm building a macOS SwiftUI app. In it, I have a popover with a TextField. The TextField has a binding that updates an ObservableObject that then propagates its value back down a NavigationView to ...
jnpdx's user avatar
  • 53.3k
0 votes
1 answer
145 views

I tried my hands on changing the color of NSPopover, I am able to change to it all desired color except transparent. As, it is known that NSPopover is by default semi transparent. I tried changing the ...
Anoop Vaidya's user avatar
  • 46.6k
1 vote
0 answers
226 views

I am looking online for an answer since yesterday, but NSPopover doesn't seem to get a lot of attention. The thing is I haven't understood the ofView: parameter exactly. When I look at some code ...
Ali's user avatar
  • 83
2 votes
1 answer
162 views

I have a NSPopover that contains two buttons. When I open the popover, the following code works to change the cursor to a pointing hand when hovering over the buttons and on clicking the button, '...
user11145365's user avatar
0 votes
1 answer
290 views

I have the code shown below, that pins an NSPopover to my NSTableView. I've looked all over Google, and SO, but I cannot find a way to pin the popover to a specific (selected) cell. @objc func ...
ICL1901's user avatar
  • 7,778
3 votes
1 answer
7k views

I try to dismiss a popover with setting the variable, that shows it to false. The sample code behaves quite strange. Is there a better way to dismiss the popover programaticly with the Cancel Button? ...
mica's user avatar
  • 4,418
0 votes
1 answer
503 views

I am building a macOS menubar app in Swift, using an NSStatusItem, which opens an NSPopover when the NSStatusItem's button is clicked. How can I also give the NSPopover focus? Currently, the user ...
j b's user avatar
  • 5,326
0 votes
0 answers
169 views

I am getting a crash with the following stack trace and I am not sure to understand what is happening and how to fix it: libobjc.A.dylib objc_release libobjc.A.dylib (anonymous namespace)::...
AP.'s user avatar
  • 5,363
0 votes
1 answer
200 views

Using Xcode 11 & macOS 10.15, I have a ParentViewController that presents a PopoverViewController in .transient mode (= clicking outside the popover dismisses it). When the user clicks outside ...
vomi's user avatar
  • 1,222
2 votes
0 answers
82 views

I have a popover which i want to resize the popover whenever click action performed. In viewDidLayout using preferredContentSize i am resizing the popover - (void)viewDidLayout { self....
zack's user avatar
  • 147
0 votes
1 answer
312 views

I have NSPopover with NSBox and subviews are: MKMapView and NSImageView. In dark mode the whole NSBox adds gamma/tint to all subviews. This doesn't appear in light mode (compare images below). It ...
Marek H's user avatar
  • 5,652
1 vote
0 answers
226 views

Background The default implementation of NSPopover will move the popover when the view it's shown over scrolls (and has special handling for when the NSRect it's attached to scrolls out of view). An ...
outis's user avatar
  • 77.7k
0 votes
1 answer
504 views

I have an NSPopover which I have set the contentViewController of and am using to display some custom UI. The popover is set to toggle open when the user clicks the status item in the status bar at ...
jeremyabannister's user avatar
8 votes
3 answers
2k views

The object of this app is to ensure the user has entered a certain text in an NSTextField. If that text is not in the field, they should not be allowed to leave the field. Given a macOS app with a ...
Jay's user avatar
  • 35.8k
3 votes
1 answer
875 views

I want to show an NSPopover in my Mac app that lists the emoji just like Apple's Messages app does like this: All I can figure out so far is that I can show the character palette in my app using this:...
Clifton Labrum's user avatar
0 votes
1 answer
303 views

In a view displayed as a Popover, I implement a help subview (a NSView with a NSScrollView as a subview) that appears when user click on a button. With Sierra & High Sierra, everything was all ...
Denis's user avatar
  • 795
6 votes
0 answers
650 views

I have a NSPopover that is draggable but I want to make it detach by clicking on a button. Like Bear Notes App.
tzuer's user avatar
  • 351
2 votes
1 answer
1k views

Swift 4.2, Xcode 10, macOS 10.14 I have created the following NSView subclass that I put on the root view of all my NSPopover instances in my storyboard. But I noticed that when I switch the color ...
Clifton Labrum's user avatar
2 votes
0 answers
300 views

I'm trying to resize my popover by increasing/decreasing its content size programmatically popover.contentSize.height += 10 and it's ok when macOS menubar is shown. But when menubar is hidden ...
Artem Bobrov's user avatar
3 votes
2 answers
2k views

I am coding a Mac app that is an NSPopover on the right side of the menu bar (Application is agent(UIElement) is set to YES). I allow the user to detach the popover by clicking and dragging it ...
TonyStark4ever's user avatar
10 votes
2 answers
2k views

Is there a way to force the NSPopover to start in the detached state? I only see isDetached which is a read-only property for the state of the popover and an NSPopoverDelegate method detachableWindow(...
Kirkova's user avatar
  • 357
2 votes
1 answer
956 views

I have a macOS NSPopover based tray app which shows a popover with login fields (username and password). Problem is that user is unable to copy-paste his email or password into text fields. The ...
mixtly87's user avatar
  • 1,735
0 votes
1 answer
232 views

I have a macOS app with a simple popover view and a NSSegmentedControl placed within it. Everything works fine, apart from the odd appearance of the segmented control. It has this weird square ...
Supertecnoboff's user avatar
1 vote
1 answer
333 views

For other applications, like Dropbox and 1Password, the popover that opens when you click the NSStatusItem in the top bar automatically hides (and then reshows) if you open up Exposé/Mission Control ...
Alex Beals's user avatar
  • 2,153
10 votes
2 answers
2k views

I'm opening a NSPopover with the action of an icon in the status bar. myPopover.show(relativeTo: button.bounds, of: button, preferredEdge: NSRectEdge.minY) This works fine with the exception that the ...
Pier's user avatar
  • 10.9k
0 votes
1 answer
580 views

I have an NSPopover where I change the content view of but when I set the view controller to something bigger than before, it shows the size that it was and I need to close and open it. static func ...
Under_Koen's user avatar
  • 1,079

1
2 3 4 5