简体   繁体   English

设置View LandscapeLeft(iPhone SDK)

[英]Set View LandscapeLeft (iPhone SDK)

Hey guys, just starting off with the iPhone SDK, I've built a simple iPhone app that displays locally stored webpages, but I want to get the app to start with the UIWebView sideways (Landscape left). 大家好,刚从iPhone SDK开始,我已经构建了一个简单的iPhone应用程序,该应用程序显示本地存储的网页,但是我想让该应用程序从侧面开始使用UIWebView(左侧的风景)。

I've set Initial interface orientation to Landscape (left home button) in the plist, but how do I actually rotate the view, because when I load it up, the view stays in portrait and the device is sideways! 我已在plist中将“ Initial interface orientation设置为“ Landscape (left home button) ,但实际上如何旋转视图,因为加载该视图时,视图将保持纵向,并且设备位于侧面!

Thanks 谢谢

in case you wanna allow all orientations if user move his iPhone just add this in your UIViewController: 万一您想允许所有方向,如果用户移动他的iPhone,只需将其添加到您的UIViewController中:

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
 return YES
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM