1

使用 Storyboard 时包含的主详细信息应用程序在视图中确实加载了此代码。

UIBarButtonItem *addButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(insertNewObject:)];

我想在与 .xib'S 相同的项目中使用它

UIBarButtonItem *addButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(showGegenstellenView)];

问题是我无法在情节提要项目中实现此代码。我找不到故事板的特殊帮助...

-(void)showGegenstellenView{
GegenstellenViewController *gegenstellenViewController = [[GegenstellenViewController alloc]initWithMasterController:self Gegenstellen:nil];
[self presentModalViewController:gegenstellenViewController animated:YES];

}

最后我想在表格视图中单击添加按钮,并且视图带有一个公式。所有这些都适用于我拥有的 xib 项目。但我想要故事板!当您想通过团队查看器或通过邮件查看 xib 项目时,我没有问题。

最好的问候约翰

4

0 回答 0