nstoolbar

NSToolbarFlexibleSpaceItem is constraint to NSSplitViewItem in Swift

余生长醉 提交于 2019-12-12 16:08:33
问题 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 NSToolbar. But it just ONE toolbar. You can open Notes app and customize the toolbar. The first flexible space is detected and moved along with first split view item. The second flexible space is detected and moved along with the second split item. The rest will be just normal flexible spaces. If there

How to make controller in NSToolbar moving with NSSplitViewController's view like Reeder or Mail.app

倖福魔咒の 提交于 2019-12-11 12:53:17
问题 I am developing a cocoa application. It contains a toolbar having some feature buttons. Just like Reeder. I want to resize the toolbar section while resizing the split view. Something works like below. How to implement this kind of feature? Any one can help me or give some suggestions will be appreciated. I am developing with XCode7, Swift and Storyboard. 回答1: Obviously there isn't any way to add a splitView to the toolbar itself and i suspect what we see in reeder is not a standard toolbar.

NSToolbar special area

ぃ、小莉子 提交于 2019-12-10 11:18:09
问题 I like to try to completely take over the area where the NSToolbar resides so I can put my own custom controls, views and background. The advantages of using this area are: Any sliding panels appear below the toolbar area instead of just the title bar. In Lion, the toolbar area comes down along with the menu bar when the mouse is at the top of the screen. I have tried using a borderless window, and implementing my own custom views within it but unfortunately I lose the above advantages as

Creating an outlet for a NSProgressIndicator inside a NSToolbar

≯℡__Kan透↙ 提交于 2019-12-08 03:13:39
问题 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 NSToolbar . I dragged a NSProgressIndicator to that toolbar and Xcode embedded it inside a NSToolbarItem . Now I need to create an outlet (not an action as explained on other stackoverflow questions) from the NSProgressIndicator to some class. First question is which one? Xcode will not let I create an

How can I get a two-row toolbar like in Mail.app and Xcode?

送分小仙女□ 提交于 2019-12-06 04:28:06
问题 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 that. Very specifically, when the window is put into fullscreen mode, that second "row" stays attached to the title bar as it slides down under the system menu bar. Xcode has a similar story. I tried setting my NSWindow to textured and placing my second row controls directly in the content view of

NSToolbarItem: “Make sure this toolbar item has a valid frame/min/max size”?

只愿长相守 提交于 2019-12-05 19:16:25
问题 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 AppTest[] NSToolbarItem (<NSToolbarItem: >) had to adjust the size of <NSPopUpButton: > from {130, 26} to the expected size of {132, 27}. Make sure that this toolbar item view has a valid frame/min/max size. This is an app bug, please do not file a bug against AppKit or NSToolbar! Break on

NSToolbarItem: “Make sure this toolbar item has a valid frame/min/max size”?

青春壹個敷衍的年華 提交于 2019-12-04 03:44:23
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 AppTest[] NSToolbarItem (<NSToolbarItem: >) had to adjust the size of <NSPopUpButton: > from {130, 26} to the expected size of {132, 27}. Make sure that this toolbar item view has a valid frame/min/max size. This is an app bug, please do not file a bug against AppKit or NSToolbar! Break on _NSToolbarAdjustedBorderedControlSizeBreakpoint Example 2: 2016-09-29 12:46:58.666074 AppTest[] NSToolbarItem (

Toggle NSToolbarItem between Black and Blue

爷,独闯天下 提交于 2019-12-04 03:29:53
I'd like to make an NSToolbarItem with a custom image which toggles between Black and Blue, like the icons at the top right of Xcode 5's main window. Peter Hosey suggested in this answer that it was as simple as setting the image to be a template , but I haven't found that to be the case. I set it to a template image, and that causes it properly render the dark gray gradient, but it doesn't render in blue when toggled. I uploaded a very simple example of what I've done, here. If someone could tell me how to change it to light up the NSToolbarItem in blue, as Xcode does, then I'd very much

Adding a custom view to toolbar

…衆ロ難τιáo~ 提交于 2019-12-03 16:29:17
问题 I'm struggling with Cocoa for 2 hours now without success. I want to add a custom view to the toolbar. So, I added a NSToolbar to the window (with IB), and added my view (which works perfectly). IB automatically created a NSToolbarItem. I followed the instructions from Apple here: http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Toolbars/Tasks/AddRemoveToolbarItems.html#//apple_ref/doc/uid/20000755-BBCGJCDJ The problem is that I don't know what to do now, the view doesn

Is it possible to draw in the label area of NSToolbar?

孤者浪人 提交于 2019-12-03 07:22:55
问题 I have a NSToolbarItem that uses a view similar to the Xcode status view. It currently has no label, but I can't figure out a way to draw into the area where the item label would normally be drawn. I would like the view to extend into that area just as the Xcode status view does. I know the very bottom portion of pixels of NSToolbar is out of bounds, but I have seen other applications draw into the label area. Any ideas? Edit: For clarification, this is the status view I'm referring to in