摘要: 图片在APP中占有重要的角色,对图片做好缓存是重要的一项工作。[TOC] 理论 不喜欢理论的可以直接跳到下面的Demo实践部分 缓存介绍 缓存按照保存位置可以分为两类:内存缓存、硬盘缓存(FMDB、CoreData…)。我们常说的网络请求缓存包含内存缓存、硬盘缓存和URL缓存。 图片缓存思路 网络请 阅读全文
posted @ 2016-03-01 15:37 专注it 阅读(1908) 评论(0) 推荐(0) 编辑
摘要: 获取应用沙盒根路径: -(void)dirHome{ NSString *dirHome=NSHomeDirectory(); NSLog(@"app_home: %@",dirHome); } 获取Documents目录路径: //获取Documents目录 -(NSString *)dirDoc 阅读全文
posted @ 2016-03-01 14:14 专注it 阅读(523) 评论(0) 推荐(0) 编辑
摘要: 一:第三方插件 1:基于响应式编程思想的oc 地址:https://github.com/ReactiveCocoa/ReactiveCocoa 2:hud提示框 地址:https://github.com/jdg/MBProgressHUD 3:XML/HTML解析 地址:https://gith 阅读全文
posted @ 2016-03-01 11:26 专注it 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 原文链接:http://www.jianshu.com/p/a086c33566be 一、 AFN 使用注意点 1. block循环引用 bug 解决 2.请求管理者 1.请求管理者存储到内存 请求管理者作为变量,实现懒加载,方便管理所有的请求,使用请求管理者变量发送请求。 2.注意:控制器挂了,我 阅读全文
posted @ 2016-03-01 11:14 专注it 阅读(306) 评论(0) 推荐(0) 编辑
摘要: 一、类的数据结构 Class(指针) typedef struct objc_class *Class; /* 这是由编译器为每个类产生的数据结构,这个结构定义了一个类.这个结构是通过编译器在执行时产生,在运行时发送消息时使用.因此,一些成员改变了类型.编译器产生"char* const"类型的字符 阅读全文
posted @ 2016-03-01 10:59 专注it 阅读(446) 评论(0) 推荐(0) 编辑
摘要: nil是一个对象指针为空,Nil是一个类指针为空,NULL是基本数据类型为空。这些可以理解为nil,Nil, NULL的区别吧。 iOS剪切板 UIPasteboard *pasteboard = [UIPasteboard generalPasteboard]; pasteboard.string 阅读全文
posted @ 2016-03-01 10:53 专注it 阅读(1962) 评论(0) 推荐(0) 编辑
摘要: Foundation框架之 日期与时间 #import"ViewController.h"@interfaceViewController() { NSTimer*_timer;//定时器对象 NSInteger_count;//用于定时器附加参数} @end @implementationView 阅读全文
posted @ 2016-03-01 10:45 专注it 阅读(274) 评论(0) 推荐(0) 编辑
摘要: //一个section刷新 NSIndexSet *indexSet=[[NSIndexSet alloc]initWithIndex:2]; [tableview reloadSections:indexSetwithRowAnimation:UITableViewRowAnimationAuto 阅读全文
posted @ 2016-03-01 10:33 专注it 阅读(329) 评论(0) 推荐(0) 编辑
摘要: 1.推送过程简介 (1)App启动过程中,使用UIApplication::registerForRemoteNotificationTypes函数与苹果的APNS服务器通信,发出注册远程推送的申请。若注册成功,回调函数application:(UIApplication *)application 阅读全文
posted @ 2016-03-01 10:26 专注it 阅读(619) 评论(0) 推荐(0) 编辑
摘要: // 主要代码 #warning iOS8 - #pragma mark 在滑动手势删除某一行的时候,显示出更多的按钮 - (NSArray *)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath  阅读全文
posted @ 2016-03-01 09:23 专注it 阅读(621) 评论(0) 推荐(0) 编辑