Skip to content

Commit

Permalink
incompatible type warning removed
Browse files Browse the repository at this point in the history
full warning -> Initializing 'VBPiePiece *__strong' with an expression of incompatible type 'id<CAAnimationDelegate> _Nullable'
  • Loading branch information
Metin Güler committed Dec 14, 2016
1 parent 9363739 commit 48eb667
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion VBPieChart/Classes/VBPiePiece.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
/*!
Structure that represent one piece of Pie Chart.
*/
@interface VBPiePiece : CAShapeLayer {
@interface VBPiePiece : CAShapeLayer <CAAnimationDelegate> {
@package
double _innerRadius;
double _outerRadius;
Expand Down
8 changes: 4 additions & 4 deletions VBPieChart/Classes/VBPiePiece.m
Original file line number Diff line number Diff line change
Expand Up @@ -300,27 +300,27 @@ - (void) drawInContext:(CGContextRef)ctx {
CAAnimationGroup *groupAnimation = (CAAnimationGroup *)[self animationForKey:@"groupAnimation"];
if (groupAnimation) {
_angle = _endAngle;
VBPiePiece *p = groupAnimation.delegate;
VBPiePiece *p = (VBPiePiece*)groupAnimation.delegate;
[p __startAngle:_startAngle];
[p __angle:_endAngle];
}

CAAnimation *arcAnimation = [self animationForKey:@"endAngle"];
if (arcAnimation) {
_angle = _endAngle;
VBPiePiece *p = arcAnimation.delegate;
VBPiePiece *p = (VBPiePiece*)arcAnimation.delegate;
[p __angle:_endAngle];
}

arcAnimation = [self animationForKey:@"innerRadius"];
if (arcAnimation) {
VBPiePiece *p = arcAnimation.delegate;
VBPiePiece *p = (VBPiePiece*)arcAnimation.delegate;
[p __innerRadius:_innerRadius];
}

arcAnimation = [self animationForKey:@"outerRadius"];
if (arcAnimation) {
VBPiePiece *p = arcAnimation.delegate;
VBPiePiece *p = (VBPiePiece*)arcAnimation.delegate;
[p __outerRadius:_outerRadius];
}
}
Expand Down

0 comments on commit 48eb667

Please sign in to comment.