[英]Take an action when user switches tabs on an NSTabView
I have an application that contains an NSTabView
.我有一个包含NSTabView
的应用程序。 Whenever the user changes tabs, I need to run an operation.每当用户更改选项卡时,我都需要运行一个操作。 How can I do that?我怎样才能做到这一点?
I'm not entirely sure from your question, but I think you're looking for the one of the NSTabViewDelegate
methods tabView:willSelectTabViewItem:
or tabView:didSelectTabViewItem:
.我不完全确定您的问题,但我认为您正在寻找NSTabViewDelegate
方法tabView:willSelectTabViewItem:
或tabView:didSelectTabViewItem:
。 These methods will be called on the tab view's delegate when it changes tab view items.在更改选项卡视图项时,将在Tab View的委托上调用这些方法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.