随笔分类 - 09 屠虫笔记
摘要:Incorrect NSStringEncoding value 0x0000 detected. 的意思是某个NSString型的变量,被赋为了空值。原因如下:1)本地终端未联网2)后台服务器挂掉总之,前台终端向后台请求数据时,没有请求到任何数据。
阅读全文
摘要:Local declaration of 'content' hides instance variable一般是函数里面定义的变量和class属性变量重名了
阅读全文
摘要:当一个字符串为null时,它不能被正常地使用,否则会报如下错误Incorrect NSStringEncoding value 0x0000 detected. Assuming NSASCIIStringEncoding. Will stop this compatiblity mapping behavior in the near future错误案例:当nstrPublicUrl==null时,如果我们写下如下代码,就会报如上警告。//错误的案例,nstrPublicUrl==nil时NSString *nstrUrl = [NSString stringWithFormat:@&qu
阅读全文
摘要:(一)wait_fences: failed to receive reply: 10004003的原因:这个问题的实质应该是在非主线程中 直接修改 界面解决的方法:在后台或子线程做的操作,刷新UI的时候,一定要在主线程进行//可能的具体情况:1、需要实现UIAlertView的代理方法- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{}2、在viewDidLoad方法里面生成了多个Button,在点击button是,切换他们的selected状态,会出现这个问题//[i
阅读全文
摘要:错误的写法_checkinLocation.coordinate.longitude = 26.876812;_checkinLocation.coordinate.longitude = 100.22569199999998;正确的写法float latitude = 26.876812; float longitude = 100.22569199999998; //这里可以是任意的经纬度值 CLLocation *_checkinLocation= [[[CLLocation alloc] initWithLatitude:latitude longitude:longitude] au
阅读全文
摘要:解决EXC_BAD_ACCESS错误的一种方法--NSZombieEnabledhttp://blog.csdn.net/likendsl/article/details/7566305
阅读全文
摘要:错误提示如下:分析: You are using multiline case statement. Your statements must be enclosed in{and}. The problem is declaring variables inside cases of a switch. The compiler is upset about trying to figure out scope when only some of the code is executed. If you put brackets around the contents of the '
阅读全文
摘要:解析一个稍微大点的XML数据20万条数据左右吧。没想到在解析XML的某个节点中,为了方便查看数据的解析进度,打印了一句Log,结果导致解析过程越来越慢。原来用XCODE打开那20万条数据,都很费劲,在执行过程中,为每一条数据大一条Log,电脑直接累疯了!
阅读全文
摘要:今天一合作伙伴传过来两个很大的XML文件,在iOS 程序下执行xmlTextReaderTyper(reader)方法后,总是返回0.最终发现,原来那两个XML文件不是UTF-8编码格式。解决方案:在PC上,使用UE将XML文件另存为下,格式选择UTF-8即可。
阅读全文
浙公网安备 33010602011771号