mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
[ASDisplayNode] Pass drawParameter in rendering context callbacks (#248)
* Pass drawParameter in rendering context callbacks * Add changelog * Fix examples
This commit is contained in:
committed by
GitHub
parent
ad9924abd8
commit
8692428481
@@ -125,7 +125,7 @@
|
||||
|
||||
_photoNode = [[ASNetworkImageNode alloc] init];
|
||||
_photoNode.URL = [NSURL URLWithString:@"http://asyncdisplaykit.org/static/images/layout-examples-photo-with-inset-text-overlay-photo.png"];
|
||||
_photoNode.willDisplayNodeContentWithRenderingContext = ^(CGContextRef context) {
|
||||
_photoNode.willDisplayNodeContentWithRenderingContext = ^(CGContextRef context, id drawParameters) {
|
||||
CGRect bounds = CGContextGetClipBoundingBox(context);
|
||||
[[UIBezierPath bezierPathWithRoundedRect:bounds cornerRadius:10] addClip];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user