I’m trying to add a toolbar to INAppStoreWindow.
It has this property:
/** The title bar view itself. Add subviews to this view that you want to show in
the title bar (e.g. buttons, a toolbar, etc.). This view can also be set if
you want to use a different styled title bar aside from the default one
(textured, etc.). **/
@property (nonatomic, retain) NSView *titleBarView;
I have a toolbar created, and linked to an outlet in my code, but how can I add it as a subview if it has a class of NSToolbar, when it requires a NSView?
This throws an exception: [aWindow.titleBarView addSubview:toolbar];
Many thanks in advance
INAppStoreWindow weasels that
titleBarViewbetween the window’s widgets and the content view:INAppStoreWindow.m:
NSToolbarisn’t anNSViewsubclass, it’s meant to work in conjunction with the window itself, which is obscured by thetitleBarView. Just for kicks, set alphas of the gradient colors inINAppStoreWindow.mand run the app; you’ll can see the “real” window is still there underneath.If you’re set on using
INAppStoreWindow, your best bet would probably be to use your own custom view with buttons to fake a toolbar and adding that as a subview of thetitleBarView. Of course, in that case you’ll have to do all the layout yourself.