Andrea
Andrea

Reputation: 437

Take an action when user switches tabs on an NSTabView

I have an application that contains an NSTabView. Whenever the user changes tabs, I need to run an operation. How can I do that?

Upvotes: 2

Views: 2452

Answers (1)

eyebrowsoffire
eyebrowsoffire

Reputation: 947

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:. These methods will be called on the tab view's delegate when it changes tab view items.

Upvotes: 6

Related Questions