Skip to content

Instantly share code, notes, and snippets.

@yarneo
Created January 3, 2019 21:50
Show Gist options
  • Save yarneo/2c70dc1675719875f4c98d85a47e388e to your computer and use it in GitHub Desktop.
Save yarneo/2c70dc1675719875f4c98d85a47e388e to your computer and use it in GitHub Desktop.
- (void)updateInkForShape {
CGRect boundingBox = CGPathGetBoundingBox(self.layer.shapeLayer.path);
self.inkView.maxRippleRadius =
(CGFloat)(MDCHypot(CGRectGetHeight(boundingBox), CGRectGetWidth(boundingBox)) / 2 + 10.f);
self.inkView.layer.masksToBounds = NO;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment