①提示错误:warning: incompatible Objective-C types 'struct MenuListController *', expected 'struct UIViewController *' when passing argument 1 of 'pushViewController:animated:' from distinct Objective-C type
可能原因
1:类头文件.h文件未申明@class MenuListController;
2:类 .m文件未申明#import "MenuListController.h"
②提示错误:Praogram received signal: "EXC_BAD_ACCESS"
可能原因
1.不必要的使用release释放内存了 只有new,alloc,retain的变量需要release
2.可以启用设置一个NSZombieEnabled,可以在调试Log里面查看EXC_BAD_ACCESS更详细的原因
在xcode项目中 选择 Executables 项 然后选择 设置 Arguments 参数, 在Variables to be set in the environment:中新增
NSZombieEnabled项 赋值为YES. 设置后再调试 可以看到更详细的错误提示
③提示错误:Undefined symbols:
"_CGRectInset", referenced from:
-[****Controller tableView:cellForRowAtIndexPath:] in ****Controller.o
Id: symbol(s) not found
collects: Id returned 1 exit status
可能原因:加入类库 CoreGraphics.framework [程序调试的好好的突然来这样的错误,找了好久,郁闷,没印象把CoreGraphics类库去掉的说]
④系统报错:
iPhone Developer: xxxxx: ambiguous (matches "iPhone Developer: xxxxx" in /Library/Keychains/System.keychain and "iPhone Developer: xxxxx" in /Users/mike/Library/Keychains/login.keychain)
Command /usr/bin/codesign failed with exit code 1
在百度上搜索全是帮翻译这句英文, 在钥匙串中有重复证书,删除掉旧的就可以了。 哪里重复了?要看钥匙串中的登录(login.keychain),系统(system.keychain)中的证书下面是否有已过期项或者重复项,还有一个重点:钥匙串里面要在 【显示】项 选择 【显示已过期证书】,不然就跟我一样瞎找哪里有重复证书