开发者

Switching between a "normal" view and a Split View Controller on orientation change IPad

开发者 https://www.devze.com 2023-03-27 17:33 出处:网络
I have an iPad application I am writing; I would like to display a \"normal\" view when开发者_如何学JAVA the device is in portrait orientation and a \"Split View\" when the device is changed to landsc

I have an iPad application I am writing; I would like to display a "normal" view when开发者_如何学JAVA the device is in portrait orientation and a "Split View" when the device is changed to landscape mode.

I can get the device to switch "normal views", however I don't see an apparent way to do this in my view controller.

My ViewController has two UIViews, one called portrait and one called landscape. In Interface Builder I assign a UIView to each of these properties. Then, when the device orientation is changed, "didRotateFromInterfaceOrientation" is called and my views change. How can I assign "portrait" to that of a Split View Controller?

Am I way off base with this question?


You may find the following tutorial useful: http://www.icodeblog.com/2010/04/05/ipad-programming-tutorial-hello-world/

The source code can be downloaded from http://staging.icodeblog.com/wp-content/uploads/2010/02/iPadHelloWorld1.zip

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号