Iphone 如何将XIB应用于景观设计

Iphone 如何将XIB应用于景观设计,iphone,xib,landscape,Iphone,Xib,Landscape,哎,, 我正在制作一个基于视图的应用程序。对于其中一个xib文件,我希望它仅以横向模式显示。如何执行此操作?确保视图的方向设置为横向: 确保此函数返回YES或(interfaceOrientation==UIInterfaceOrientationLandscape) 在资源文件夹中的Project-info.plist文件中,将有一个“支持界面方向”选项,可根据您的要求进行设置。那么,有没有适合您的解决方案? - (BOOL)shouldAutorotateToInterfaceOrienta

哎,,
我正在制作一个基于视图的应用程序。对于其中一个xib文件,我希望它仅以横向模式显示。如何执行此操作?

确保视图的方向设置为横向:

确保此函数返回YES或(interfaceOrientation==UIInterfaceOrientationLandscape)


在资源文件夹中的Project-info.plist文件中,将有一个“支持界面方向”选项,可根据您的要求进行设置。

那么,有没有适合您的解决方案?
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return YES;
    // Or you can use the following return statement: 
    //return (interfaceOrientation == UIInterfaceOrientationLandscape);
}