Created
January 3, 2019 21:50
-
-
Save yarneo/2c70dc1675719875f4c98d85a47e388e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (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