mirror of
https://github.com/HackPlan/AsyncDisplayKit.git
synced 2026-05-13 00:39:06 +08:00
[docs] Tweak README code snippet.
This commit is contained in:
@@ -50,7 +50,7 @@ dispatch_async(_backgroundQueue, ^{
|
||||
node.frame = (CGRect){ CGPointZero, node.calculatedSize };
|
||||
|
||||
// self.view isn't a node, so we can only use it on the main thread
|
||||
dispatch_sync(dispatch_get_main_queue(), ^{
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[self.view addSubview:node.view];
|
||||
});
|
||||
});
|
||||
|
||||
@@ -52,7 +52,7 @@ dispatch_async(_backgroundQueue, ^{
|
||||
node.frame = (CGRect){ CGPointZero, node.calculatedSize };
|
||||
|
||||
// self.view isn't a node, so we can only use it on the main thread
|
||||
dispatch_sync(dispatch_get_main_queue(), ^{
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[self.view addSubview:node.view];
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user