Skip to content

Commit

Permalink
Minor updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Coyner committed Oct 30, 2011
1 parent 3f02bc2 commit 94c25fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 2 additions & 3 deletions CoreAnimationFunHouse/BTSLissajousLayer.m
Expand Up @@ -64,14 +64,13 @@ - (void)drawInContext:(CGContextRef)context
CGContextSetLineWidth(context, 2.0);
CGContextSetShadow(context, CGSizeMake(5.0, 2.5), 5.0);

// The layer redraws the content using the current animation's interpolated values. The interpolated
// The layer redraws the curve using the current animation's interpolated values. The interpolated
// values are retrieved from the layer's "presentationLayer".
CGFloat amplitude = [[(NSValue *)[self presentationLayer] valueForKey:kBTSLissajouseLayerAmplitude] floatValue];

CGFloat a = [[(NSValue *)[self presentationLayer] valueForKey:kBTSLissajouseLayerA] floatValue];
CGFloat b = [[(NSValue *)[self presentationLayer] valueForKey:kBTSLissajouseLayerB] floatValue];

CGFloat delta = [[(NSValue *)[self presentationLayer] valueForKey:kBTSLissajouseLayerDelta] floatValue];

CGMutablePathRef path = CGPathCreateMutable();

CGFloat increment = 2 * M_PI / (a * b * 40);
Expand Down
3 changes: 1 addition & 2 deletions CoreAnimationFunHouse/BTSLissajousViewController.m
Expand Up @@ -36,7 +36,7 @@ - (void)viewDidLoad
BTSLissajousLayer *layer = (BTSLissajousLayer *)[[[self view] viewWithTag:100] layer];

[_amplitudeSlider setMinimumValue:0.0];
[_amplitudeSlider setMaximumValue:[layer bounds].size.height / 2.0 - 5.0];
[_amplitudeSlider setMaximumValue:[layer bounds].size.height / 2.0];
[_amplitudeSlider setValue:[_amplitudeSlider maximumValue] / 2.0];

[_aStepper setMinimumValue:0.0];
Expand Down Expand Up @@ -91,7 +91,6 @@ - (IBAction)updateA:(id)sender {
float value = [(UIStepper *)sender value];
[_aValueLabel setText:[NSString stringWithFormat:@"%0.0f", [_aStepper value]]];


[layer setA:(CGFloat)value];
}

Expand Down

0 comments on commit 94c25fd

Please sign in to comment.