随笔分类 -  IOS dev

IOS开发 僵尸调试
摘要:1: 为工程运行时加入 NSZombieEnabled 环境变量,并设为启用,则在 EXC_BAD_ACCESS 发生时,XCode 的 Console 会打印出问题描述。首先双击 XCode 工程中,Executables 下的 可执行模组, 在弹出窗口中,Variables to be set in the environment,添加 NSZombieEnabled,并设定为 YES,点击选中复选框启用此变量。 这样,运行上述 Objective-C 时会看到控制台输出:Untitled[3646:a0f] *** -[CFString release]: message sent to 阅读全文
posted @ 2013-08-01 21:55 DDC's blog 阅读(406) 评论(0) 推荐(0)
iphone开发基础教程 第11章例程的问题
摘要:z在《iphone开发基础教程》第11章的例子程序 Persistence第一版用到了这段程序UIApplication *app = [UIApplication sharedApplication]; [[NSNotificationCenter defaultCenter] addObserver:selfselector:@selector(applicationWillTerminate:)name:UIApplicationWillTerminateNotification object:app];书上说按home后 程序会触发 UIApplicationWillTerminate 阅读全文
posted @ 2013-03-24 15:16 DDC's blog 阅读(260) 评论(0) 推荐(0)
unrecognized selector sent to instance (IOS开发遇到的问题)
摘要:今天在学习tableview,运行后发现tableview一往下拉程序就会奔溃,EXC_BAD_ACCESS ,错误信息是unrecognized selector sent to instance。郁闷了我一个下午。。。后来看到这个http://blog.csdn.net/theonezh/article/details/7967623终于解决了问题转“成unrecognized selector sent to instance XXX,大部分情况下是因为对象被提前release了,在你心里不希望他release的情况下,指针还在,对象已经不在了。很多时候,是因为init初始化函数中,对属 阅读全文
posted @ 2013-03-17 01:34 DDC's blog 阅读(369) 评论(0) 推荐(0)