Default UIView width is 768 in UIViewController iPad Landscape mode?
I create a Storyboard with a UIViewController in iPad landscape mode.
I put some logging info in UIViewController and it says the default width of the default view in UIView is 768 but I think the default width for landscape mode should be 1024. ( I use self.view in the logging info). Why would this happen?
You must have logged self.view in viewDidLoad. The main view always loads in portrait, even if the current device orientation is landscape (and even if the only orientation supported by the app is landscape). Log self.view later in the view controller life cycle (e.g., viewDidAppear:) and its dimensions will probably match your expectations.
Also, it doesn't really matter what the orientation is in storyboard, it's just a simulation.