摘要: 需求:有5个任务.前两个 同时执行, 后两个也同时执行异步函数 + 并发队列因为并发队列执行的时候,是没有顺序的,所以才会有前两个任务同时执行完毕之后在执行第三个耗时操作,想要确保第一个和第二个耗时操作执行完之后就执行第三个操作,这看似是需要串行执行,但是在没有串行的时候,就需要其他的办法,比如在第... 阅读全文
posted @ 2015-09-02 22:41 记忆里的那座沙城 阅读(307) 评论(0) 推荐(0) 编辑
摘要: #import "ViewController.h"@interface ViewController ()@end@implementation ViewController- (void)viewDidLoad { [super viewDidLoad]; // 创建串行队列 serial ... 阅读全文
posted @ 2015-09-02 07:42 记忆里的那座沙城 阅读(78) 评论(0) 推荐(0) 编辑
摘要: #import "ViewController.h"@interface ViewController ()@end@implementation ViewController- (void)viewDidLoad { [super viewDidLoad]; }- (void)touchesB... 阅读全文
posted @ 2015-09-02 07:38 记忆里的那座沙城 阅读(156) 评论(0) 推荐(0) 编辑
摘要: #import "ViewController.h"@interface ViewController ()@end@implementation ViewController- (void)viewDidLoad { [super viewDidLoad]; // Do any additio... 阅读全文
posted @ 2015-09-02 07:36 记忆里的那座沙城 阅读(103) 评论(0) 推荐(0) 编辑
摘要: #import "ViewController.h"@interface ViewController ()//图片框 UIImageView@property (weak, nonatomic) IBOutlet UIImageView *imageView;@end@implementation... 阅读全文
posted @ 2015-09-02 00:27 记忆里的那座沙城 阅读(115) 评论(0) 推荐(0) 编辑
摘要: /*------------------------------ GCD使用 1.队列和任务------------------------------------------*/重点:1.“串行队列”?“并发队列”? 2.block?1.GCD(Crand Central Dispatch)—“牛... 阅读全文
posted @ 2015-09-02 00:23 记忆里的那座沙城 阅读(113) 评论(0) 推荐(0) 编辑
摘要: synchronize|ˈsɪŋkrənaɪz|A.transitive verb使同步to synchronize [something] with [something]使某事物与某事物同步B.intransitive verb«movement,sound,action»同时发生to sync... 阅读全文
posted @ 2015-09-02 00:16 记忆里的那座沙城 阅读(129) 评论(0) 推荐(0) 编辑