标签栏应用程序 XCODE (iOS 5) 中的方向



嗨,我正在开发标签栏应用程序,我想在其中仅支持第一个视图的横向视图,而不是所有选项卡视图,只有一个选项卡应该支持所有方向,其余选项卡应该只支持纵向,我已经在FirstView.m中尝试了以下代码

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return(interfaceOrientation == UIInterfaceOrientationPortrait || interfaceOrientation == UIInterfaceOrientationLandscapeLeft);
}

在第二视图.m

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
    {
return(interfaceOrientation == UIInterfaceOrientationPortrait);
}

它不允许我在任何选项卡视图中进行横向浏览,任何 1 可以帮助我吗?提前致谢

阅读有关iOS 5中(BOOL)shouldAutorotateToInterfaceOrientation方法

你需要或你的接口,而不是和它们。

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return(interfaceOrientation == UIInterfaceOrientationPortrait || interfaceOrientation == UIInterfaceOrientationLandscapeLeft);
}

最新更新