本文介绍了“预期方法主体"错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的应用程序运行正常,然后什么也不做,却在appDelegate.h
中出现2个错误.有人这样说:
I had my application working fine, then without doing anything, out of nowhere I got 2 errors in appDelegate.h
. One says this:
另一个说:
我不知道为什么会这样,我有其他项目具有完全相同的应用程序委托,而且它们都可以正常工作.
I have no idea why this is happening, I have other projects with the exact same app delegate and they all work just fine.
这是我的appDelegate.h:
This is my appDelegate.h:
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate> // I get the errors here
@property (strong, nonatomic) UITabBarController *tbc;
@property(strong, nonatomic) UIWindow *window;
@end
推荐答案
我遇到了同样的问题.最后,我发现在main.m中,我不小心在文件开头添加了-"字符.
I had the same problem. At last I found that in my main.m I had accidentally added a "-" character in the beginning of the file.
删除字符解决了这个问题.
Removing the character solved the problem.
这篇关于“预期方法主体"错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!