Monotouch.Dialog IOS 6拆分视图旋转问题 [英] Monotouch.Dialog IOS 6 Split view Rotation issue

查看:147
本文介绍了Monotouch.Dialog IOS 6拆分视图旋转问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

BUMP ..仍然没有想到这一点,事情旋转,但不在视野范围内。太奇怪了。
我可以提供更好的信息来获得帮助吗?

BUMP .. still havent figured this out, the thing rotates, but out of view. so weird. can i provide better information to get help?

还有这个问题!它真的很糟糕我不能解决这个问题:(帮助请

STILL HAVING THIS ISSUE! its really bad i cant fix this :( help PLEASE

BUMP ..请我死在这里!有人!:)

BUMP .. please im dieing here! someone anyone! :)

所以,我正在使用 Monotouch.Dialog ,自从IOS 6以来,我的splitview控制器的旋转动作很奇怪。

So, I'm using Monotouch.Dialog and since IOS 6, the rotation of my splitview controller is acting weird.

它实际上在旋转,但是我的细节视图占据了整个屏幕,主视图看起来好像是从屏幕框架上旋转出来的。也就是说,我可以看到主视图在旋转时瞬间消失,然后细节视图占据整个屏幕。

It is actually rotating, but my detail view takes up the whole screen and the master view seems as if its being rotated off the screen frame. That is, I can see the master view for a split second when it rotates then it's gone, and the detail view takes the whole screen.

我添加了必要的视图 ShouldAutorotate 功能并设置 GetSupportedInterfaceOrientations 自IOS 6.就像我说它旋转,但有些东西刚刚关闭。

I've added the necessary ShouldAutorotate function and set the GetSupportedInterfaceOrientations since IOS 6. Like I said it rotates, but something is just off.

我已经尝试过IOS 5模拟器并且它可以工作,所以它肯定是IOS 6的问题。

I've tried the IOS 5 simulator and it works, so it's definitely an IOS 6 problem.

任何人都有我还应该在哪里找到问题?

Anyone have an idea where else I should look for the problem?

编辑:我注意到在调试时它没有进入我的主视图和详细视图的ShouldAutorotate覆盖,仅在我的拆分视图控制器它进入。在iOS 5中它正确进入ShouldAutorotateToInterfaceOrientation。

I noticed while debugging that it doesnt go into the ShouldAutorotate override of my master and detail view, only in my split view controller it goes in. In iOS 5 it goes into ShouldAutorotateToInterfaceOrientation properly.

这是我在我的细节和主视图中使用的代码:

Here is the code i use in my Detail and Master views:

public override bool ShouldAutorotate()
    {
        return true;
    }
    [Obsolete]
    public override bool ShouldAutorotateToInterfaceOrientation       (MonoTouch.UIKit.UIInterfaceOrientation toInterfaceOrientation)
    {
        return true;
    }

这是我在SplitViewController中的代码:

And here is the code i have in my SplitViewController:

public override bool ShouldAutorotate()
    {
        return true;
    }

    [Obsolete]
    public override bool ShouldAutorotateToInterfaceOrientation(UIInterfaceOrientation requested)
    {
        return requested == UIInterfaceOrientation.LandscapeRight || requested == UIInterfaceOrientation.LandscapeLeft;
        //return requested == UIInterfaceOrientation.Portrait || requested == UIInterfaceOrientation.PortraitUpsideDown;

    }

    public override bool ShouldAutomaticallyForwardRotationMethods {
        get {
            return true;
        }
    }

有人请吗?我的工作需要这个,我无法解决这个问题!任何想法都会有所帮助!

anyone please? i need this for my work and i cant solve this! any ideas would be helpful!

推荐答案

另外不要忘记设置 window.rootViewController (否则旋转将无法在iPad上运行)。

Also don't forget to set window.rootViewController (otherwise rotation will not work on the iPad).

这篇关于Monotouch.Dialog IOS 6拆分视图旋转问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆