摘要: 之前安装过一次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) 编辑