首页 > 移动平台 > 详细

iOS - 零碎

时间:2014-11-30 22:53:11      阅读:348      评论:0      收藏:0      [点我收藏+]

---恢复内容开始---

1、模拟器目录:

ProjectNameApk、documents、library(cache、preference、cookies)、temp

2、Edit-Refactor(重构)-Convert to Objective-C ARC...

3、Product-Profile()-instruments(leak、GPU、CoreData、CoreAnimation、Network。。。。)

       -Analyze(分析)

4、多线程创建、指定主线程执行、延迟执行代码:

创建:NSThread--

  • NSThread *thread = [NSThread alloc] initWithTarget:self selector:@selector(run:) object:nil];    [thread start];
  • [NSThread detachNewThreadWithSelector:@selector(run:) toTarget:self withObject:nil];
  • [obj performSelectorInBackground:@selector(run:) withObject:nil];

GCD--

  • dispatch_async(dispath_get_global_queue(0,0)^{ .......  });//后台执行
  • dispatch_async(dispath_get_main_queue(0,0)^{  ....... });//主线程执行
  • static dispatch_once_t oncetoken;     dispatch_once(&oncetoken,^{  .......  });

延迟执行:

double delayInSeconds = 2.0;

dispatch_time_t poptime=      ;

dispatch_after(poptime,dispatch_get_main_queue(),^{ ......  });

NSOperation --

NSOperationQueue queue = [NSOperationQueue alloc] init];

[queue addOperation:  oneOper ];

 

5.手势

  • Tap
  • Pinch
  • Rotation
  • swipe
  • pan
  • longPress

iOS - 零碎

原文:http://www.cnblogs.com/tx8899/p/4133883.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!