Try different contentMode values to change the appearance of some UIKit views during device rotation.
You know how a metal view like SKView stretches and scales the view when you rotate your device?
We can change that behavior with the contentMode property of a UIView. By default, SKView.contentMode is set to .scaleToFill, which produces the stretched look. If we use the .center mode instead, we get a better looking behavior:
With contentMode = .center, the view is instantly resized before rotation then rotated while respecting its proportions.
Ideally, the scene should cover the full view before it's rotated, without any stretching. But I haven't found a better setting than .center, and .redraw isn't supported on SKView.
Ideally, we should set contentMode to .redraw to force the view to redraw its content according to the current size. But .redraw doesn't seem to work on SKView.