开发者

Pushed icon in toolbar

I put on bevel button in toolbar, set image for this button and uncheck checkbox bordered. How make pushed icon i开发者_运维问答n toolbar like this?

Pushed icon in toolbar


You need to mark your toolbar item as Selectable. Edit your nib file in Xcode, double click the toolbar, click the item in Allowed Toolbar items and, in the Utilities panel, show the Attributes inspector and mark the Selectable checkbox.


Return your item identifiers in the delegate of the toolbar:

- (NSArray*)toolbarSelectableItemIdentifiers:(NSToolbar *)toolbar
{
    return _toolbarIdentifiers;
}

The toolbar will consider them selectable, so the selected item will be displayed the way you need.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜