Facebook Asynchronous Layout and Rending
by 吴雪莹
dispatch_async(backgroundQueue, ^{ storyNode = [[FBStoryNode alloc] initWithStory:story]; [storyNode layoutWithin:CGSizeMake(320,FLT_MAX)]; });
- (void)display { dispatch_async(backgroundQueue, ^{ CGContextRef ctx = newContextOfSize(self.bounds.size); [self.node drawInContext:ctx]; dispatch_async(main, ^{ self.contents = ctx; }); }); }
本文转自mfrbuaa博客园博客,原文链接:http://www.cnblogs.com/mfrbuaa/p/5031975.html,如需转载请自行联系原作者