Skip to content

Instantly share code, notes, and snippets.

@jhildensperger
Created July 13, 2014 20:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jhildensperger/8228b613156ba4fe1aad to your computer and use it in GitHub Desktop.
Save jhildensperger/8228b613156ba4fe1aad to your computer and use it in GitHub Desktop.
Swift out as described by Google's design documentation
#import "CAMediaTimingFunction+SwiftOut.h"
@implementation CAMediaTimingFunction (SwiftOut)
+ (CAMediaTimingFunction *)swiftOut
{
CGPoint controlPoint1 = CGPointMake(0.4, 0.0);
CGPoint controlPoint2 = CGPointMake(0.2, 1.0);
return [self functionWithControlPoints:controlPoint1.x :controlPoint1.y :controlPoint2.x :controlPoint2.y];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment