您的位置:首页 > 移动开发 > IOS开发

ios横屏设置

2011-09-16 16:28 435 查看
在程序info.plist修改或添加

<key>UIInterfaceOrientation</key>

<string>UIInterfaceOrientationLandscapeRight</string>

if(interfaceOrientation == UIInterfaceOrientationPortrait||interfaceOrientation==UIInterfaceOrientationPortraitUpsideDown){

[backimage setImage:[UIImage imageNamed:@"Shu_Background.png"]];

SetFrame 320,480

}else

{

[backimage setImage:[UIImage imageNamed:@"Heng_Background.png"]];

SetFrame 480,320

}

return ((interfaceOrientation == UIDeviceOrientationLandscapeLeft)||(interfaceOrientation == UIDeviceOrientationLandscapeRight)||(interfaceOrientation == UIDeviceOrientationPortraitUpsideDown)||(interfaceOrientation == UIDeviceOrientationPortrait));
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: