mirror of
https://github.com/HackPlan/AsyncDisplayKit.git
synced 2026-04-24 03:45:58 +08:00
Make ASNetworkImageNode Just Work.
Use ASBasicImageDownloader by default -- you can now do... ASNetworkImageNode *imageNode = [[ASNetworkImageNode alloc] init]; imageNode.URL = [NSURL URLWithString:@"..."]; [self.view addSubview:imageNode.view]; ...and it'll do the right thing.
This commit is contained in:
@@ -74,7 +74,7 @@ static const CGFloat kInnerPadding = 10.0f;
|
||||
_kittenSize = size;
|
||||
|
||||
// kitten image, with a purple background colour serving as placeholder
|
||||
_imageNode = [[ASNetworkImageNode alloc] initWithCache:nil downloader:[[ASBasicImageDownloader alloc] init]];
|
||||
_imageNode = [[ASNetworkImageNode alloc] init];
|
||||
_imageNode.backgroundColor = [UIColor purpleColor];
|
||||
_imageNode.URL = [NSURL URLWithString:[NSString stringWithFormat:@"http://placekitten.com/%zd/%zd",
|
||||
(NSInteger)roundl(_kittenSize.width),
|
||||
|
||||
Reference in New Issue
Block a user