viewDidLoadでアニメーションのコードを書いても回転しないのでハマっていたのですが、単純にViewWillAppear以降じゃないとアニメーションしないというオチでした。意外に言及されてないようなのでメモしておきます。
UIViewのアニメーションについては、「UIView 回転」で検索すれば山ほど出てくるので、そちらをご参考に下さい。と、いいつつ一応書いておきます。永遠にくるくる回転するサンプルコードです。
let rotateAnimation = CABasicAnimation(keyPath: "transform.rotation")
// 起点を0度とする
rotateAnimation.fromValue = 0.0
// 終点を360度とする
rotateAnimation.toValue = CGFloat(.pi * 2.0)
// 2秒で1回転
rotateAnimation.duration = 2.0
// 永遠に回転
rotateAnimation.repeatCount = .infinity
// アニメーションを追加
imageView.layer.add(rotateAnimation, forKey: nil)