0
我想实现CABasicAnimation并在动画完成时通知UIViewController。从这个资源:动画委托不转换为Swift 3.0
http://www.informit.com/articles/article.aspx?p=1168314&seqNum=2
我明白,我可以指定视图 - 控制作为动画的委托,并重写的ViewController内animationDidStop
方法。然而,当我转换的代码以下行斯威夫特:
[animation setDelegate:self];
像这样:
animation.delegate =自//没有setDelegate方法
的XCode抱怨:
Cannot assign value of type 'SplashScreenViewController' to type 'CAAnimationDelegate?'
我做错了什么?我错过了什么吗?