Authored by Thomas Rasch

o Updated RMCircle to use setPosition:animated:

... ... @@ -35,7 +35,7 @@
@interface RMCircle ()
- (void)updateCirclePath;
- (void)updateCirclePathAnimated:(BOOL)animated;
@end
... ... @@ -68,7 +68,7 @@
enableDragging = YES;
circlePath = NULL;
[self updateCirclePath];
[self updateCirclePathAnimated:NO];
return self;
}
... ... @@ -85,7 +85,7 @@
#pragma mark -
- (void)updateCirclePath
- (void)updateCirclePathAnimated:(BOOL)animated
{
CGPathRelease(circlePath); circlePath = NULL;
... ... @@ -113,7 +113,7 @@
// animate the path change if we're in an animation block
//
if ([CATransaction animationDuration] > 0)
if (animated)
{
CABasicAnimation *pathAnimation = [CABasicAnimation animationWithKeyPath:@"path"];
... ... @@ -138,7 +138,7 @@
{
[lineColor release];
lineColor = [newLineColor retain];
[self updateCirclePath];
[self updateCirclePathAnimated:NO];
}
}
... ... @@ -148,27 +148,27 @@
{
[fillColor release];
fillColor = [newFillColor retain];
[self updateCirclePath];
[self updateCirclePathAnimated:NO];
}
}
- (void)setRadiusInMeters:(CGFloat)newRadiusInMeters
{
radiusInMeters = newRadiusInMeters;
[self updateCirclePath];
[self updateCirclePathAnimated:NO];
}
- (void)setLineWidthInPixels:(CGFloat)newLineWidthInPixels
{
lineWidthInPixels = newLineWidthInPixels;
[self updateCirclePath];
[self updateCirclePathAnimated:NO];
}
- (void)setPosition:(CGPoint)position
- (void)setPosition:(CGPoint)position animated:(BOOL)animated
{
[super setPosition:position];
[self setPosition:position];
[self updateCirclePath];
[self updateCirclePathAnimated:animated];
}
@end
... ...