上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 36 下一页
摘要: xcode arc 下使用 block警告 Capturing [an object] strongly in this block is likely to lead to a retain cycle” in ARC-enabled code解决方法:方法一: ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:[NSURL URLWithString:Api]]; __block ASIHTTPRequest *brRequest = request; [request setCompletionB... 阅读全文
posted @ 2014-01-15 15:40 cocoajin 阅读(4274) 评论(0) 推荐(0)
摘要: iOS key value coding kvc在接收json数据与 model封装中的使用使用 kvc 能够极大的简化代码工作,及以后的接口维护工作;1:先创建MovieModel类.h和 .m 注意Model类的属性根据 后台接口返回的 json数据 里面的字段对应,一一对应;// Created by cocoajin on 14-1-15.// Copyright (c) 2014年 www.zhgu.net. All rights reserved.//#import @interface MovieModel : NSObject@property (nonatomic,st... 阅读全文
posted @ 2014-01-15 15:31 cocoajin 阅读(1116) 评论(0) 推荐(0)
摘要: NSData 转 bytes 字节数据NSData *data = [NSData dataWithContentsOfFile:filePath];NSUInteger len = [data length];Byte *byteData = (Byte*)malloc(len);memcpy(byteData, [data bytes], len); NSString *strPath = @"/Users/user/Desktop/jkk.txt"; NSLog(@"string = %@",[[NSString alloc]initWithCon 阅读全文
posted @ 2014-01-15 11:26 cocoajin 阅读(7140) 评论(0) 推荐(0)
摘要: git commit 出现 changes not staged for commit 错误修复:参考:http://stackoverflow.com/questions/8488887/git-error-changes-not-staged-for-commit 阅读全文
posted @ 2014-01-14 16:49 cocoajin 阅读(5685) 评论(0) 推荐(0)
摘要: iOS exit(),abort(),assert()函数区别exit() 退出程序abort() 停止程序,assert()检查里面的参数如果为nil抛出异常; 阅读全文
posted @ 2014-01-13 09:45 cocoajin 阅读(2028) 评论(0) 推荐(0)
摘要: ios 程序发布使用xcode工具Application Loader 正在通过ITUNES STORE进行鉴定错误一:此错误会导致上传程序,一直停留在验证阶段,而没有一点上传进度;结果会苦等半天,无果;二:修复此错误注意点:如上图:注意,选择的target, 里面的Distribution 里面的 设置参考:http://blog.csdn.net/topbar/article/details/12850451http://blog.csdn.net/topbar/article/details/12909155 阅读全文
posted @ 2014-01-11 16:39 cocoajin 阅读(3106) 评论(0) 推荐(0)
摘要: iOS mac添加证书 不能修改“System Roots”钥匙串错误如图:解决方式:打开钥匙串---登录---,直接把证书拖过来然后,查看--我的证书,里面,找到证书,即可 阅读全文
posted @ 2014-01-11 16:06 cocoajin 阅读(7271) 评论(0) 推荐(0)
摘要: 一:在同一个view上加载,UITapGestureRecognizer手势,UIButton 行为,UITabelView点击事件冲突;二:解决方式: 在UITapGesttureRecognizer的手势的代理UIGestureRecognizerDelegate里面屏蔽上面的冲突事件三:如代码: //处理键盘取消 UITapGestureRecognizer *resinTheInput = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(resignTheInPuts)]; re... 阅读全文
posted @ 2014-01-07 10:07 cocoajin 阅读(4565) 评论(0) 推荐(0)
摘要: 一:NSUserDefaults支持的数据格式有:NSNumber(Integer、Float、Double),NSString,NSData,NSArray,NSDictionary,BOOL类型;二:可以把自定义的对象,转换为NSData来达到存储对象到NSUserDefaults的目的;如代码: 1:model.h #import @interface ReplayModel : NSObject@property (nonatomic,strong)NSNumber *useTimes; //使用次数@property (nonatomic,strong)NSDate *a... 阅读全文
posted @ 2014-01-07 09:40 cocoajin 阅读(3438) 评论(0) 推荐(0)
摘要: 一:如下代码 //对数据按次数排序 NSArray *sortArrays = [pinCiDataArray sortedArrayUsingComparator:^NSComparisonResult(id obj1, id obj2) { NSNumber *num1 = [(ReplayModel *)obj1 useTimes]; NSNumber *num2 = [(ReplayModel *)obj2 useTimes]; return [... 阅读全文
posted @ 2014-01-07 09:30 cocoajin 阅读(649) 评论(0) 推荐(0)
上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 36 下一页