使用 uitableviews 时如何将新视图加载到视图堆栈上
我目前有一个导航项目,加载了 4 个自定义单元格,其中 UItextField 覆盖了整个单元格。我的目标是创建一个方法,当用户“着陆”事件调用我的方法将新视图加载到导航堆栈时,该方法将加载新视图。
唯一的问题是我不知道确切的代码。这是我现在所拥有的,但我弹出了几十个错误,
- (IBAction)newView{
SelectionListDetailViewController *selection = [[SelectionListDetailViewController alloc] initWithNibName:@"SelectionListDetailViewController" bundle:nil];
[self.navigationController pushViewController:selection animated:YES];
}
我有 18 个错误,这些错误说!程序中存在“@”,
我走在正确的路径上吗?你看到我做错了什么吗?任何帮助将不胜感激。
I currently have a Navigational project loaded with 4 custom cells that have a UItextField covering the whole cell. My goal is to create a method that will load a new view when the user "touch down" event calls my method that loads a new view onto the navigation stack.
the only problem being I dont know the exact code for this. here is what I have now but I have dozens of errors popping up
- (IBAction)newView{
SelectionListDetailViewController *selection = [[SelectionListDetailViewController alloc] initWithNibName:@"SelectionListDetailViewController" bundle:nil];
[self.navigationController pushViewController:selection animated:YES];
}
I have 18 errors that say !stray '@' in program
am I on the right path? do you see anything that I am doing wrong? any help would be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只是一个想法。尝试在使用时推动视图控制器
并使用
确保导入必要的头文件(SelectionListDetailViewController.h)和将其引用到正确的类。
Just an idea. Try pushing the view controller while using
and use
Make sure you import the necessary header files (SelectionListDetailViewController.h) & reference it to the right class.