I have an app with a tab bar, and nav controllers in each tab. When user shakes the device, a UIImageView appears as a child view in the nav controller. But the
UIImageView
And if you simply want whether the device is in landscape or portrait, a simple solution is (in Swift):
var orientation = "portrait" if UIScreen.main.bounds.size.width > UIScreen.main.bounds.size.height { orientation = "landscape" }