我正在开发一个IOS应用程序。我使用Facebook AsyncDisplayKit库。我想一个按钮ASNodeCell卜我“变量‘节点’当块中捕获的初始化。我如何添加的UIButton或ASNodeCell UIWebView的控制。请帮我使用AsyncDisplayKit添加自定义按钮
dispatch_queue_t _backgroundContentFetchingQueue;
_backgroundContentFetchingQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0);
dispatch_async(_backgroundContentFetchingQueue, ^{
ASDisplayNode *node = [[ASDisplayNode alloc] initWithViewBlock:^UIView *{
UIButton *button = [UIButton buttonWithType:UIButtonTypeSystem];
[button sizeToFit];
node.frame = button.frame;
return button;
}];
// Use `node` as you normally would...
node.backgroundColor = [UIColor redColor];
[self.view addSubview:node.view];
});
https://github.com/liaogang/ASPhotoBrowser.git,这个演示可能有帮助 – liaogang 2016-01-08 07:45:49