nstoolbar Questions
4
Solved
I have a toolbar with various options and some options should not be visible in some cases. I have already figured out a way to disable them in my application, using this callback:
- (BOOL) valid...
Gaikwar asked 10/2, 2011 at 22:2
2
Solved
Im creating a NSWindowController and its window programatically. So i create a simple NSToolbar with:
NSToolbar *toolbar = [[NSToolbar alloc] initWithIdentifier:@"PreferencesToolbar"];
[toolbar s...
Pivotal asked 27/2, 2012 at 15:10
2
With macOS 11 Apple has introduced a new NSToolbarItem called NSSearchToolbarItem that automatically resizes to accommodate typing when the focus switches to the toolbar item.
Here Apple says thi...
Session asked 8/11, 2020 at 15:42
4
Solved
Hi I've seen this question asked a few times already but with no definite answer yet so I created it for xcode 7 and swift2 (which may have changed things a bit anyway).
I created a project using ...
Borderland asked 24/6, 2015 at 10:0
1
Almost all macOS official apps have this toolbar's feature which the NSToolbarItem flexible space is constraint to NSSplitViewItem view. I first thought maybe there are 3 different sections on NS...
Shugart asked 21/9, 2016 at 20:23
4
Solved
This is how SwiftUI can be inserted into NSToolbar using an accessory view controller:
import SwiftUI
import PlaygroundSupport
var hostingView = NSHostingView(rootView:
ZStack {
Color.clear
HS...
1
Solved
In Big Sur, Xcode and Calendar have toolbar items that stay over the sidebar when open but remain visible on the left side when the sidebar's collapsed.
Sidebar open:
Sidebar collapsed:
In "...
Luben asked 20/8, 2020 at 19:32
1
Consider this macOS app code implemented with app delegate lifecycle:
App delegate:
func applicationDidFinishLaunching(_ aNotification: Notification) {
let contentView = ContentView()
window = NS...
2
Solved
Finder and Notes have a peculiar behaviour that I am seeking to reproduce. The ‘flexible space’ in the NSToolbar seems to take the dimensions of the split view into account. For instance, the first...
Levasseur asked 29/12, 2016 at 2:11
2
Solved
I'm making a Cocoa app, with a hidden unified NSToolbar and Titlebar. I've done so by adding a toolbar in the Window Controller and setting all the options to make this invisible and keep the 3 col...
Gemology asked 6/11, 2018 at 14:29
1
Solved
I'd like a toolbar button with an attached dropdown menu, like the "Flag" button in the toolbar in Mail.app:
I'd hoped that making a normal NSMenuItem and adding a menu as the menuFormRepresenta...
Pigfish asked 27/4, 2018 at 15:51
3
Solved
I'm trying to add a "second row" after my NSToolbar in my app, that remains part of the title bar. As an example, Mail has a thin gray divider line below the NSToolbar with some extras items below ...
1
Solved
Desired look
I wish to make a toolbar for my app that will contain some simple buttons, each with a single monochromatic icon. Here is an example of some toolbar buttons similar to I'm trying to ac...
Goltz asked 8/9, 2017 at 13:29
1
Solved
I have an NSToolbarItem with an NSButton as its view and an NSMenuItem in the main menu. Both have the same action, which is sent to the first responder, not to a particular target. That method is ...
Acosmism asked 26/2, 2017 at 15:49
6
Solved
I've been trying to build on a Cocoa app that uses Swift and Storyboard in Xcode 6, but how can I use NSToolbar there?
In Xcode 5 and xib, you can add NSToolbar from within Object Library to any ....
Anatollo asked 14/6, 2014 at 11:27
5
Solved
Since upgrading to Mac OS Sierra and the new XCode version I get the following error every time I launch my application for every one of the NSToolbarItems:
Example 1:
2016-09-29 12:46:58.659879 A...
Motorman asked 29/9, 2016 at 11:1
2
In my project I have a NSToolBar which has 5 NSToolBarItems. I want to remove last two toolbarItems in which one is NSToolbarSpaceItemIdentifier, and reload the toolbar again.
How to do this?
I am...
Breathy asked 29/1, 2014 at 10:59
1
Solved
I'm currently trying to write a Mac application. In doing so, I'm having some peculiar problems when trying to setup an NSToolbar.
Although I have setup all the components as per the API documenta...
Vorticella asked 15/7, 2016 at 8:52
1
Solved
I want to add two touching items, such as a forward and back button, to NSToolbar, like so:
NSToolbar seems to add horizontal margins by default, for each item, like this:
I checked out the X...
Selfinduced asked 30/4, 2016 at 18:32
2
I'm using an NSToolbarItemGroup to group a set of NSToolbarItem's together. Currently there is a 2pt space between each item in the group, ideally I would like them to be completely merged visually...
Broussard asked 6/7, 2015 at 11:30
5
Solved
I'm trying to open a pop-up menu from a NSToolbarItem. I tried following this example but I can't use that class method because NSToolbar and NSToolbarItem inherit from NSObject and not from NSView...
Hardware asked 30/9, 2009 at 18:5
4
Solved
I have a project that needs to disable/enable some NSToolbarItems depends on different options. I checked and found no parameter for this.
Is there a way to enable/disable a given NSToolbarItem?
Fokos asked 5/11, 2011 at 2:48
2
I have been creating a preferences panel that would pop up when an user taps ⌘+, in my Cocoa app, and I like to use the same General and Downloads icons that are used in Xcode.
However, as far a...
Twostep asked 2/2, 2015 at 13:38
4
Solved
1
Solved
I have this OSX storyboard-based application that starts with a NSSplitViewController like this:
This splitViewController has two viewControllers: master and detail.
Inside the window I have a ...
Frazer asked 18/12, 2014 at 20:18
1 Next >
© 2022 - 2024 — McMap. All rights reserved.