If I write Swift 3 code it would look like this:
let animation = CABasicAnimation(keyPath: #keyPath(CAShapeLayer.path))
But I tried to use Swift 4 new syntax for keyPath and I got:
let keyPath = \CAShapeLayer.path
let animation = CABasicAnimation(keyPath: keyPath) // error line
> Error: Cannot convert value of type 'ReferenceWritableKeyPath' to expected argument type 'String?'
How can I use key path in this situation with swift 4?