单击按钮时,我正在尝试更改选项卡视图。我有这个代码:
- (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,但如果是这样,那是什么?