我是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];
}
如何解决此问题?