【发布时间】:2012-08-17 01:46:02
【问题描述】:
大家好,抱歉,我环顾四周,但这里的预期表达错误论坛都与我无关。我正在制作我的第一个应用程序,但我所学到的任何东西都无法帮助我解决这个错误。我看了又看,只发现复杂应用程序中的错误,而我的应用程序非常基本。这是:这是更新的代码!!!!!!
- (IBAction)StartButton:(id)sender; <--- "Expected Expression"
{
PrimaryViewController *controller = [[PrimaryViewController alloc]
initWithNibName:@"PrimaryViewController" bundle:nil];
[self.navigationController pushViewController: controller animated:YES];
}
阅读 - 这是更新后的代码,错误显示在“预期表达式”的第一行,谢谢! ((((更新::它与xibs和StartViewController是它自己的类。))))请帮助!在 - (IBAction)... 行上,它表示预期的表达式。当您按下开始按钮 IBAction 时,我正在尝试将视图控制器从主菜单推送到开始屏幕。它也链接到文件菜单。谢谢!
【问题讨论】:
-
这是用 xibs 还是用故事板?
-
StartViewController 是类名还是对象?
-
它与xibs和StartViewController是一个类。
-
你不需要“;”在方法签名的末尾
标签: xcode view controller push ibaction