iOS 代码延迟执行

1. [NSTread sleepForTimeInterval:0.8f]  

这个方法 实际效果 好比打断点 等你再恢复断点执行

2.  [self performSelector:@selector(fun:) withObject:nil afterDelay:0.8f];

这个 就适合UI层级的 异步方式  延迟执行  比较好  还有延迟执行的方法 "fun"

按需求来 当前笔记待补充 

原文地址:https://www.cnblogs.com/someonelikeyou/p/4454321.html