I want to implement CABasicAnimation and have the UIViewController notified when the animation is completed. From this resource:
http://www.informit.com/articles/article.aspx?p=1168314&seqNum=2
I understood that I can specify the viewcontroller as a delegate for the animation and override animationDidStop
method within the viewcontroller. However when I convert the following line of code into Swift:
[animation setDelegate:self];
like so:
animation.delegate = self //there are no setDelegate method
XCode complains:
Cannot assign value of type 'SplashScreenViewController' to type 'CAAnimationDelegate?'
What am I doing wrong? Am I missing something?