Cannot assign value of type 'CALayer' to type 'CAAnimationDelegate?'

+1 vote
43 views
asked May 20 in Swift by anonymous

Hi 

  I extended the CALayer but while assiging the delegate its throwing error .

Error:

Cannot assign value of type 'CALayer' to type 'CAAnimationDelegate?'

1 Answer

0 votes
answered May 20 by anonymous

Sample 

  class MKLayer: CALayer {

  }

  You will get error, TO ride off just add CAAnimationDelegate

  class MKLayer: CALayer,CAAnimationDelegate {

  }

...