Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个包含NSTabView. 每当用户更改选项卡时,我都需要运行一个操作。我怎样才能做到这一点?
NSTabView
我不能完全确定您的问题,但我认为您正在寻找其中一种NSTabViewDelegate方法tabView:willSelectTabViewItem:或tabView:didSelectTabViewItem:. 当Tab View的委托更改选项卡视图项目时,这些方法将在Tab View的委托上调用。
NSTabViewDelegate
tabView:willSelectTabViewItem:
tabView:didSelectTabViewItem: