当按钮被点击时,我想要改变选项卡视图。我有以下代码:
- (IBAction)startScratch:(id)sender {
_mainTabBar.tabBarController.selectedIndex = 1;
//Error: ^ Property tabBarController not found on type "NSTabView*"
}
这是需要翻译的内容:
这个 .h 文件中包含以下代码行:
@property (weak) IBOutlet NSTabView *mainTabBar;
- (IBAction)startScratch:(id)sender;
我假设我应该替换_mainTabBar,但如果是这样,应该替换成什么呢?
NSTabView
没有名为tabBarController
的属性。你想做什么? - user529758