我想要一个函数,当关闭 SecondViewController 完成时
我需要 Cocoa Touch(适用于 iOS/iPhone)上的代码方面的帮助。 我想要一个函数,当关闭 SecondViewController 完成时,因为我需要将一个字符串从第二个视图控制器传递到第一个视图控制器。
当我在第二个视图控制器中包含第一个视图控制器时,调试器返回以下内容:
“在 FirstViewController
之前预期的说明符限定符列表”
感谢大家,并对我的英语感到抱歉。 卢卡斯·莫雷拉.
I need help with my code on Cocoa Touch (for iOS/iPhone).
I want a function when dismiss SecondViewController finish, because I need to pass one string to from second view controller to first view controller.
When I include First View Controller in Second View Controller, the debugger return this:
"Expected specifier-qualifier-list before FirstViewController
"
Thanks for all and sorry for my english.
Lucas Moreira.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是编译器说的,而不是调试器说的。 (请注意,它位于“构建结果”窗口中。由于您尚未完成构建,因此您的代码尚未运行;当您运行它时,它将在调试器下运行。来自调试器和正在运行的应用程序的消息,出现在调试器控制台窗口中。)
这是一个语法错误。您的代码在语法上无效;编译器无法理解它。
您可能应该在 Xcode 构建设置中将编译器更改为 clang,因为 clang 比默认的 GCC 编译器具有更好的错误消息。如果您仍然无法理解该问题,请编辑您的问题以包含编译器不喜欢的函数或方法的代码。
据猜测,要么您忘记了编译器指向的行之前的分号,要么您忘记将函数或方法体放在大括号中 (
{}
)。That's the compiler saying that, not the debugger. (Notice that it's in the Build Results window. Since you did not complete the build, your code has not run yet; when you do get it to run, it will run under the debugger. Messages from the debugger, and from your running app, appear in the Debugger Console window.)
That's a syntax error. Your code is syntactically invalid; the compiler cannot understand it.
You should probably change your compiler to clang in your Xcode build settings, as clang has better error messages than the default GCC compiler. If you still can't make sense of the problem, edit your question to include your code for the function or method that the compiler doesn't like.
At a guess, either you forgot a semicolon on the line before the one the compiler pointed to, or you forgot to put the function or method body in braces (
{}
).