上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 36 下一页
摘要: json数据非常友好方便的处理;推荐一个在线json数据格式化网站http://json.parser.online.fr/ 阅读全文
posted @ 2013-11-01 16:51 cocoajin 阅读(522) 评论(0) 推荐(0) 编辑
摘要: 在ARC下使用[theTarget performSelector:theTarget withObject:Nil];会出现警告:performselector-may-cause-a-leak-because-its-selector-is-unknown解决方法:1:添加如下宏#define SuppressPerformSelectorLeakWarning(Stuff) \do { \_Pragma("clang diagnostic push") \_Pragma("clang diagnostic ignored \"-Warc-perfo 阅读全文
posted @ 2013-11-01 15:18 cocoajin 阅读(501) 评论(0) 推荐(0) 编辑
摘要: UITextView 默认没有 pleaceholder属性;我们可以通过多种方式添加在UITextView的代理方法中写- (void)textViewDidBeginEditing:(UITextView *)textView{ if ([textView.text isEqualToString:@"建议字数在300字左右"]) { textView.text = @""; textView.textColor = [UIColor blackColor]; //optional } [textView becomeFirstResponde... 阅读全文
posted @ 2013-10-31 13:38 cocoajin 阅读(278) 评论(0) 推荐(0) 编辑
摘要: 使用cocoasPod做第三方类库管理非常方便,但是在使用的过程之中会遇到一些小问题!比如初次使用会遇到 引入类库,说找不到文件target--build settings---user search path----user head search path添加 ${SRCROOT} 后面选择 recursive 阅读全文
posted @ 2013-10-28 16:06 cocoajin 阅读(395) 评论(0) 推荐(0) 编辑
摘要: 之前安装过一次cocoapods 后来,安装octopress,安装过一次较新版的ruby,可能是由于ruby安装,把之前的cocoapods删除了,结果使用,出现如图错误解决:重新安装 cocoapods在终端下:gem install cocoapods 阅读全文
posted @ 2013-10-23 14:53 cocoajin 阅读(368) 评论(0) 推荐(0) 编辑
摘要: 无意中发现,有人创建UIButton这样写UIButton *previousButton = [UIButtonbuttonWithType:101];一看原来是私有api UIButton *previousButton = [UIButton buttonWithType:101]; [previousButton setTitle:@"<" forState:UIControlStateNormal]; previousButton.frame = CGRectMake(0.f, 0.f, 30.f, 80.f); previousButton.center 阅读全文
posted @ 2013-10-23 14:36 cocoajin 阅读(666) 评论(0) 推荐(0) 编辑
摘要: iOS7 下使用SVPullToRefresh 下拉刷新导航栏位置错误;下拉刷新之后,tableview的第一列会跑到导航栏的下面;修正:添加如下代码 /** * 下拉刷新 增加一个; */ //修复下拉刷新位置错误 代码开始 if ([self respondsToSelector:@selector(automaticallyAdjustsScrollViewInsets)]) { self.automaticallyAdjustsScrollViewInsets = NO; UIEdgeInsets ... 阅读全文
posted @ 2013-10-23 13:43 cocoajin 阅读(1672) 评论(0) 推荐(0) 编辑
摘要: ARC下 does not support automated __weak references错误此错误,通常是你的ARC下不支持weak 把你项目里面,weak的地方 改为 unsafe_unretained参考:http://stackoverflow.com/questions/6893038/how-do-i-replace-weak-references-when-using-arc-and-targeting-ios-4-0 阅读全文
posted @ 2013-10-23 13:16 cocoajin 阅读(323) 评论(0) 推荐(0) 编辑
摘要: iOS7 设置navigationBar的颜色,新增了一个属性 barTintColor CGFloat osVersion = [[UIDevice currentDevice].systemVersion floatValue]; if (osVersion >= 7.0) { rootNa.navigationBar.barTintColor = [UIColor redColor]; } else { rootNa.navigationBar.tintColor = [UIColor redColor]; } 阅读全文
posted @ 2013-10-23 11:32 cocoajin 阅读(400) 评论(0) 推荐(1) 编辑
摘要: ubuntu 下安装 VIM 依赖vim-common错误sudo apt-get remove vim-common 先把上面的错误依赖删除sudo apt-get install vim 然后安装vim -v 查看是否安装! 阅读全文
posted @ 2013-10-22 22:07 cocoajin 阅读(1181) 评论(0) 推荐(0) 编辑
上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 36 下一页