Permalink
Browse files

Updated to Xcode 8.3.2

  • Loading branch information...
briancoyner committed May 27, 2017
1 parent 33dc5b1 commit 3b3c401a51cf162c98efa1104ee0fdc4499b2e82
@@ -8,7 +8,7 @@
/* Begin PBXBuildFile section */
5D0060411435FB2700615004 /* BTSPulseViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5D0060401435FB2700615004 /* BTSPulseViewController.m */; };
5D0D7E4C1BD7C41C0062CD26 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 5D0D7E4B1BD7C41C0062CD26 /* Default-568h@2x.png */; settings = {ASSET_TAGS = (); }; };
5D0D7E4C1BD7C41C0062CD26 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 5D0D7E4B1BD7C41C0062CD26 /* Default-568h@2x.png */; };
5D284BA1144BB57E0000650E /* BTSSineWaveLayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 5D284BA0144BB57E0000650E /* BTSSineWaveLayer.m */; };
5D284BA3144BB7A20000650E /* BTSSineWaveView.m in Sources */ = {isa = PBXBuildFile; fileRef = 5D284BA2144BB7A20000650E /* BTSSineWaveView.m */; };
5D31F6ED143BEA0E008ECE3D /* BTSReflectionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5D31F6EC143BEA0E008ECE3D /* BTSReflectionViewController.m */; };
@@ -285,7 +285,7 @@
isa = PBXProject;
attributes = {
CLASSPREFIX = BTS;
LastUpgradeCheck = 0700;
LastUpgradeCheck = 0830;
ORGANIZATIONNAME = "Brian Coyner";
};
buildConfigurationList = 5D6FBC5B142BB9A80015A945 /* Build configuration list for PBXProject "CoreAnimationFunHouse" */;
@@ -378,8 +378,10 @@
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJCPP_ARC_ABI = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -426,8 +428,10 @@
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJCPP_ARC_ABI = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -9,7 +9,7 @@
#import "BTSBezierPathViewController.h"
#import "BTSCubicBezierPathView.h"
@interface BTSBezierPathViewController () {
@interface BTSBezierPathViewController ()<CAAnimationDelegate> {
// store a reference so we can modify the title ("Animate", "Stop")
IBOutlet UIBarButtonItem *__weak _animateButton;
@@ -22,7 +22,7 @@
// NOTE: Sometimes the 'needsDisplayForKey:' (as described in 'BTSSineWaveLayer.m') can produce undesired 'flickering' effects.
// I have yet to see any undesired 'flickering' effects using the CADisplayLink approach.
@interface BTSLissajousLayer () {
@interface BTSLissajousLayer ()<CAAnimationDelegate> {
CADisplayLink *_displayLink;
NSMutableArray *_currentAnimations;
}
@@ -65,7 +65,7 @@ - (void)drawInContext:(CGContextRef)context
CGRect bounds = [self bounds];
CGContextTranslateCTM(context, CGRectGetWidth(bounds) / 2.0, CGRectGetHeight(bounds) / 2.0);
CGContextTranslateCTM(context, (CGFloat)(CGRectGetWidth(bounds) / 2.0), (CGFloat)(CGRectGetHeight(bounds) / 2.0));
BTSDrawCoordinateAxes(context);
CGContextSetStrokeColorWithColor(context, [[UIColor blackColor] CGColor]);
@@ -74,10 +74,10 @@ - (void)drawInContext:(CGContextRef)context
// The layer redraws the curve using the current animation's interpolated values. The interpolated
// values are retrieved from the layer's "presentationLayer".
id presentationLayer = [self presentationLayer];
CGFloat amplitude = [[(NSValue *)presentationLayer valueForKey:kBTSLissajouseLayerAmplitude] floatValue];
CGFloat a = [[(NSValue *)presentationLayer valueForKey:kBTSLissajouseLayerA] floatValue];
CGFloat b = [[(NSValue *)presentationLayer valueForKey:kBTSLissajouseLayerB] floatValue];
CGFloat delta = [[(NSValue *)presentationLayer valueForKey:kBTSLissajouseLayerDelta] floatValue];
CGFloat amplitude = [[presentationLayer valueForKey:kBTSLissajouseLayerAmplitude] floatValue];
CGFloat a = [[presentationLayer valueForKey:kBTSLissajouseLayerA] floatValue];
CGFloat b = [[presentationLayer valueForKey:kBTSLissajouseLayerB] floatValue];
CGFloat delta = [[presentationLayer valueForKey:kBTSLissajouseLayerDelta] floatValue];
CGFloat increment = TWO_PI / (a * b * 100.0f);
CGMutablePathRef path = CGPathCreateMutable();
@@ -12,7 +12,7 @@
static NSString *const kBTSSineWaveLayerFrequency = @"frequency";
static NSString *const kBTSSineWaveLayerPhase = @"phase";
@interface BTSSineWaveLayer () {
@interface BTSSineWaveLayer ()<CAAnimationDelegate> {
CADisplayLink *_displayLink;
NSMutableArray *_currentAnimations;
}
@@ -63,7 +63,7 @@ - (void)drawInContext:(CGContextRef)context;
CGRect bounds = [self bounds];
CGContextTranslateCTM(context, 0.0, CGRectGetHeight(bounds) / 2.0);
CGContextTranslateCTM(context, 0.0, (CGFloat)(CGRectGetHeight(bounds) / 2.0));
BTSDrawCoordinateAxes(context);
@@ -73,9 +73,9 @@ - (void)drawInContext:(CGContextRef)context;
// The layer redraws the content using the current animation's interpolated values. The interpolated
// values are retrieved from the layer's "presentationLayer".
id presentationLayer = [self presentationLayer];
CGFloat amplitude = [[(NSValue *)presentationLayer valueForKey:kBTSSineWaveLayerAmplitude] floatValue];
CGFloat frequency = [[(NSValue *)presentationLayer valueForKey:kBTSSineWaveLayerFrequency] floatValue];
CGFloat phase = [[(NSValue *)presentationLayer valueForKey:kBTSSineWaveLayerPhase] floatValue];
CGFloat amplitude = [[presentationLayer valueForKey:kBTSSineWaveLayerAmplitude] floatValue];
CGFloat frequency = [[presentationLayer valueForKey:kBTSSineWaveLayerFrequency] floatValue];
CGFloat phase = [[presentationLayer valueForKey:kBTSSineWaveLayerPhase] floatValue];
unsigned int stepCount = (unsigned int)CGRectGetWidth(bounds);
for (int t = 0; t <= stepCount; t++) {
@@ -58,7 +58,7 @@ - (void)stopWiggling:(UIGestureRecognizer *)gesture
{
// remember discrete gestures are simply recognized
if ([gesture state] == UIGestureRecognizerStateRecognized) {
CALayer *wiggleLayer= [self wiggleLayer];
CALayer *wiggleLayer = [self wiggleLayer];
[wiggleLayer bts_stopWiggling];
}
}
@@ -32,7 +32,7 @@ - (void)bts_startWiggling
[rotationAnimation setAutoreverses:YES];
[rotationAnimation setFromValue:@(M_PI / 100.0)];
[rotationAnimation setToValue:@(-M_PI/ 100.0)];
[rotationAnimation setToValue:@(-M_PI / 100.0)];
// Create the translation animation along the X axis. This gives is a slight sliding effect, which looks nice.
CABasicAnimation *translationXAnimation = [CABasicAnimation animationWithKeyPath:@"transform.translation.x"];
@@ -1,6 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
"info": {
"version": 1,
"author": "xcode"
}
}
View
@@ -1,13 +1,19 @@
# Core Animation Fun House
## Created by Brian Coyner, 2011, 2012, 2013, 2014, 2015
## Core Animation Fun House
### Created by Brian Coyner, 2011, 2012, 2013, 2014, 2015, 2016, 2017
A suite of sample code showing how to use various aspects of the Core Animation framework
A suite of ObjC sample code showing how to use various aspects of the Core Animation framework.
Examples include:
- Implicit animations (size, color, border, corners, etc.)
- Implicit animations (size, color, border, corners, etc)
- Explicit animations (transforms)
- Animation along a path
- Animation along a `UIBezierPath`
- Bézier curve editor (with animation along a path)
- Using a `CAReplicatorLayer` and `CAGradientLayer` to create a reflection (with full sublayer animation support)
- Wiggle and jiggle (using two explicit animations)
- Wiggle and jiggle (using two explicit animations)
- Animating a sine wave using custom animatable `CALayer` properties
- Animating a Lissajous Curve using custom animatable `CALayer` properties
Xcode Requirements:
- last updated to work with Xcode 8.3.2

0 comments on commit 3b3c401

Please sign in to comment.