IOS

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

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
原文地址:https://www.cnblogs.com/tx8899/p/4133883.html