摘要: - (void)performSelector:(SEL)aSelector withObject:(id)anArgument afterDelay:(NSTimeInterval)delay; 这个方法是单线程的,也就是说只有当前调用次方法的函数执行完毕后,selector方法才会被调用。 比如 阅读全文
posted @ 2016-08-18 17:58 丑蛋蛋 阅读(384) 评论(0) 推荐(0) 编辑
摘要: 一、performSelector调用和直接调用区别下面两段代码都在主线程中运行,我们在看别人代码时会发现有时会直接调用,有时会利用performSelector调用,今天看到有人在问这个问题,我便做一下总结,[delegate imageDownloader:self didFinishWithI 阅读全文
posted @ 2016-08-18 16:13 丑蛋蛋 阅读(10492) 评论(0) 推荐(0) 编辑
摘要: 1.performSelectorOnMainThread:withObject:waitUntilDone: - (void)performSelectorOnMainThread:(SEL)aSelector withObject:(id)arg waitUntilDone:(BOOL)wait 阅读全文
posted @ 2016-08-18 16:08 丑蛋蛋 阅读(289) 评论(0) 推荐(0) 编辑