03 2015 档案

iPhone屏幕适配,历史及现状
摘要:转自:http://mobile.51cto.com/iphone-465179.htm初代 iPhone2007 年,初代 iPhone 发布,屏幕的宽高是 320 x 480 像素。下文也是按照宽度,高度的顺序排列。这个分辨率一直到 iPhone 3GS 也保持不变。那时编写 iOS 的 App... 阅读全文

posted @ 2015-03-23 16:44 sfce 阅读(353) 评论(0) 推荐(0)

android流量监测代码
摘要:/** 获取手机通过 2G/3G 接收的字节流量总数 */ TrafficStats.getMobileRxBytes(); /** 获取手机通过 2G/3G 接收的数据包总数 */ TrafficStats.getMobileRxPackets(... 阅读全文

posted @ 2015-03-22 15:15 sfce 阅读(1328) 评论(0) 推荐(0)

IOS之GCD
摘要:GCD是Grand Central Dispatch的简称,它是基于语言的,用来解决多核并行运算。使用GCD,线程完全由系统进行管理,不需要再编写线程代码。GCD的核心是:将长期运行的任务拆分成多个工作单元,并将这些单元添加到dispatch queue中,系统会为我们管理这些dispatch qu... 阅读全文

posted @ 2015-03-16 14:01 sfce 阅读(279) 评论(0) 推荐(0)

IOS之NSOperationQueue
摘要:一个NSOperation对象可以通过start方法来执行任务,默认是同步执行的,可以将NSOperation加入到一个NSOperationQueue中去异步执行。创建操作队列:NSOperationQueue *queue = [[NSOperationQueue alloc] init];添加... 阅读全文

posted @ 2015-03-11 09:52 sfce 阅读(533) 评论(0) 推荐(0)

IOS之NSOperation
摘要:一、NSOperation 1.简介NSOperation实例封装了需要执行的操作和执行操作所需的数据,并且能够以并发或非并发的方式执行这个操作。NSOperation本身是抽象基类,因此必须使用它的子类,使用NSOperation子类的方式有两种:a.Foundation框架提供了两个具体子类直... 阅读全文

posted @ 2015-03-09 09:24 sfce 阅读(214) 评论(0) 推荐(0)

IOS之NSThread
摘要:初始化:1.动态方法- (id)initWithTarget:(id)target selector:(SEL)selector object:(id)argument;// 初始化线程NSThread *thread = [[NSThread alloc] initWithTarget:self ... 阅读全文

posted @ 2015-03-06 18:00 sfce 阅读(132) 评论(0) 推荐(0)

IOS之NSNotification
摘要:NSNotificationCenter是专门供程序中不同类间的消息通信而设置的.注册通知:[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(mytest:) name:@"mytest" objec... 阅读全文

posted @ 2015-03-06 17:45 sfce 阅读(119) 评论(0) 推荐(0)

ios之KVC、KVO
摘要:KVC是KeyValueCoding的简称,它是一种可以直接通过字符串的名字(key)来访问类属性的机制。而不是通过调用Setter、Getter方法访问。获取值- (id)valueForKey:(NSString *)key;- (id)valueForKeyPath:(NSString *)k... 阅读全文

posted @ 2015-03-06 17:40 sfce 阅读(174) 评论(0) 推荐(0)

ios使用dispatch_group_async和dispatch_group_notify异步转同步
摘要:http://www.dreamingwish.com/article/gcd介绍(二)-多核心的性能.htmldispatch_queue_t queue = dispatch_get_global_qeueue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);dispat... 阅读全文

posted @ 2015-03-03 15:43 sfce 阅读(558) 评论(0) 推荐(0)

导航