简体   繁体   中英

How to edit a toolbar in Interface Builder (Xcode 5)?

I have a toolbar in an NSWindow in my Cocoa app, and it works great, but I'm having trouble editing it. When I open it (or double-click on any of its items in the tree on the left in Xcode), the toolbar editing sheet hides behind other views in the NSWindow .

Is there a way to edit a toolbar by itself in a new window or something? Is there a trick to getting other views in my NSWindow to go "below" the toolbar in IB? The toolbar itself is perfectly fine when my program is running. It's just editing it that's a giant pain.

EDIT : Here, the content area of the window has a vertical NSSplitView , and the left half (an NSScrollView ) is completely over the toolbar customizing sheet in IB, and the Custom View on the right side is over the sheet as well but it's transparent so I can see through it a little bit:

在此处输入图片说明

If I delete the window contents (the NSSplitView ), then I can edit the toolbar (like Jay's picture), but that can't be what I'm expected to do every time I want to edit a toolbar item.

Basically editing the toolbar in IB is as easy as double-clicking..

在此处输入图片说明

Double-click on either the Toolbar or an Toolbar Item and the Toolbar Editor will open in the Editor area of IB. This is the same view users can see when customizing toolbars at runtime.

在此处输入图片说明

To change the toolbar configuration you then change the Default toolbar items area to whatever you desire and hit Done afterwards!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM