0
我正在尝试添加一个工具栏到INAppStoreWindow。添加工具栏到INAppStoreWindow
它具有这样的特性:
/** 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;
我有一个工具栏创建,并链接到一个出口在我的代码,但我怎么能添加它作为一个子视图如果它有一个类NSToolbar的,当它需要一个NSView?
这将引发异常:[aWindow.titleBarView addSubview:toolbar];
提前感谢
完美!还有一件事,即使窗口改变了大小,我如何将子视图居中,并让它保持在中心位置? – GarethPrice
'INAppStoreWindow'可以在' - (void)_layoutTrafficLightsAndContent'中工作,我将其子类化并重置子视图的边界。 –