我是mac开发的新手。我习惯于NSSplitView
分裂我的观点。当我从拆分视图左侧选择字段时,所选视图已显示在拆分视图的右侧。
现在的问题是,当我按下右侧所选视图控制器上的按钮以从该视图控制器转到另一个时,未执行操作。
- (IBAction)newProductAction:(id)sender {
[self replaceViewWithCurrentView:@"nP" productImageValue:0 andProductId:([ItemModel getMaxValueOfItemIdFromItemBit:[appDelegate getDBPath]] + 1)];
}
#pragma mark - Replace Current View To Product View
- (void)replaceViewWithCurrentView:(NSString *)actionInfo productImageValue:(int)pIV andProductId:(int)itemIde {
ProductDataIMViewController *pDIMVC = [[ProductDataIMViewController alloc] initWithNibName:@"ProductDataIMViewController" bundle:nil];
pDIMVC.senderInfo = actionInfo;
pDIMVC.itemIdentity = itemIde;
float frameWidth = [pDIMVC view].frame.size.width;
float frameHeight = [pDIMVC view].frame.size.height;
[[pDIMVC view] setFrame:CGRectMake(0, 0, frameWidth, frameHeight)];
[self.view.superview replaceSubview:self.view with:pDIMVC.view];
}
我该如何解决这个问题?