Basic Animation using CABasicAnimation in iOS Swift language

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 relative interpolation. All properties are optional, and no more than two should be non-nil. The object type should match the type of the property being animated. We can also set duration and repeat