简体   繁体   English

当用户在 NSTabView 上切换标签时采取行动

[英]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.

相关问题 Cocoa - 找出 NSTabView 何时更改其选项卡 - Cocoa - finding out when an NSTabView has changed its tabs Objective-C框架PSMTabBarControl不起作用-具有样式的NSTabView选项卡 - Objective-C Framework PSMTabBarControl does not work - NSTabView Tabs with Style NSTabView与NSTabViewController —何时使用控制器? - NSTabView vs NSTabViewController — When to use the controller? 如何知道用户何时切换响铃/静音(静音)按钮? - How to know when user switches ring/silent (mute) button? 切换标签页时,iOS Tabbed应用程序会切换回iPhone 5上的iPhone 4分辨率 - iOS Tabbed Application switches back to iPhone 4 resolution on iPhone 5 when switching tabs 当用户向服务器发送请求并且用户切换到另一个屏幕并返回到上一个屏幕时,UITableView数据未重新加载 - UITableView data is not reloading when user sends request to server and user switches to another screen and comes back to previous NSTabView 替代品 - NSTabView alternatives 在持续触摸时采取行动,而不是仅在触摸时才采取行动 - Take action on sustained touch instead of just when getting touchesBegan: 将NSTabViewItem的NSTabViewItem副本添加到同一个NSTabView中 - Adding a copy of an NSTabViewItem from an NSTabView into the same NSTabView 在表格中选择一行时,它会切换到空白屏幕 - When selecting a row in table, it switches to blank screen
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM