CABasicAnimation An object that provides basic, single-keyframe animation capabilities for a layer property.

Using init(keyPath:) method of CABasicAnimation you can animated particular the key path of the property.

Properties of CABasicAnimation

var fromValue: Any?

Defines the value the receiver uses to start interpolation.

var toValue: Any?

Defines the value the receiver uses to end interpolation.

var byValue: Any?

Defines the value the receiver uses to perform...

Read complete blog post