Вы можете обнаружить вращение устройства указанным ниже способом и переместить ваши предметы.
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
NotificationCenter.default.addObserver(self, selector: #selector(deviceRotated), name: NSNotification.Name.UIDeviceOrientationDidChange, object: nil)
}
override func viewWillDisappear(_ animated: Bool) {
NotificationCenter.default.removeObserver(self, name: NSNotification.Name.UIDeviceOrientationDidChange, object: nil)
}
func deviceRotated(){
if UIDeviceOrientationIsLandscape(UIDevice.current.orientation) {
print("Landscape")
// Resize other things
}
if UIDeviceOrientationIsPortrait(UIDevice.current.orientation) {
print("Portrait")
// Resize other things
}
}