Fix delegates

This commit is contained in:
Panayot Cankov
2016-09-14 09:08:53 +03:00
parent b81c034f67
commit b316bc7260
2 changed files with 9 additions and 3 deletions

View File

@@ -41,10 +41,12 @@ interface IOSView extends viewModule.View {
_isPresentationLayerUpdateSuspeneded();
}
class AnimationDelegateImpl extends NSObject {
class AnimationDelegateImpl extends NSObject implements CAAnimationDelegate {
public nextAnimation: Function;
static ObjCProtocols = [CAAnimationDelegate];
private _finishedCallback: Function;
private _propertyAnimation: PropertyAnimationInfo;
private _valueSource: number;
@@ -360,7 +362,7 @@ export class Animation extends common.Animation implements definition.Animation
}
let animationDelegate = AnimationDelegateImpl.initWithFinishedCallback(finishedCallback, animation, valueSource);
nativeAnimation.setValueForKey(animationDelegate, "delegate");
nativeAnimation.delegate = animationDelegate;
nativeView.layer.addAnimationForKey(nativeAnimation, args.propertyNameToAnimate);