Bug 7513 - UISplitViewController master view out of screen since IOS 6
Summary: UISplitViewController master view out of screen since IOS 6
Status: RESOLVED NORESPONSE
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: 6.0.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-09-27 13:59 UTC by Roy
Modified: 2013-12-05 18:35 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NORESPONSE

Description Roy 2012-09-27 13:59:49 UTC
Hello

I am 99% sure that without any changes on my side since IOS 6 the masterview in my splitview is rotating out of screen.
That is, i see it sliding to the left and then you cant see it anymore.

Have you experienced this issue and do you have any tips for me?

It has been working perfectly until IOS 6.

Thank you
Comment 1 Sebastien Pouliot 2012-09-27 16:49:32 UTC
This works fine for me. Can you describe this in more details (maybe a screen cast) ? or attach a test case that shows your issue ?
Comment 2 Roy 2012-10-01 13:23:57 UTC
Hi again sorry for the delay, was busy.

here is the code i use in my uisplitview controller: *the commented code is what i used before IOS 6.


		/*public override bool ShouldAutorotateToInterfaceOrientation(UIInterfaceOrientation requested)
		{
			return requested == UIInterfaceOrientation.LandscapeRight || requested == UIInterfaceOrientation.LandscapeLeft;
			//return requested == UIInterfaceOrientation.Portrait || requested == UIInterfaceOrientation.PortraitUpsideDown;
			
		}*/

		public override bool ShouldAutorotate()
		{
			return true;
		}


and this is the code i use in my master controller :


public override void DidRotate (UIInterfaceOrientation fromInterfaceOrientation)
		{
			base.DidRotate (fromInterfaceOrientation);

			this.TableView.SelectRow(lastSelectedQuestion, false, UITableViewScrollPosition.Middle);
		}

		/*public override bool ShouldAutorotateToInterfaceOrientation (MonoTouch.UIKit.UIInterfaceOrientation toInterfaceOrientation)
		{
			return true;
		}*/

		public override bool ShouldAutorotate()
		{
			return true;
		}


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

Ive read on the internet that were some changes made as to how IOS 6 handles rotation.
Can you please provide me with examples what changes i should make. I am using Monotouch.Dialog.

Thank you
Comment 3 Sebastien Pouliot 2012-10-02 08:26:45 UTC
iOS 6 deprecate the use of ShouldAutorotateToInterfaceOrientation [1]. However it does not means ShouldAutorotateToInterfaceOrientation is not called on iOS6. For compatibility with existing applications it will continue to be called as long as you do not export its replacements [2].

In this case ShouldAutorotateToInterfaceOrientation was replaced by *two* new selectors [1] (methods you can override in MonoTouch).

* SupportedInterfaceOrientations; and
* PreferredInterfaceOrientationForPresentation

If you override those then they will be called on iOS6 but your application won't work in iOS 5.x (and earlier).

Note that if you want ot move to iOS6-only calls then I suggest you to watch the WWDC2012 video on handling rotations. It covers a lot more cases.

[1] http://developer.apple.com/library/ios/#documentation/uikit/reference/UIViewController_Class/DeprecationAppendix/AppendixADeprecatedAPI.html#//apple_ref/occ/instm/UIViewController/shouldAutorotateToInterfaceOrientation:

[2] at some point (in a few iOS release) it's possible that Apple will remove the deprecated selector (even if, in general, they tend to be kept for a long time).
Comment 4 Roy 2012-10-08 11:13:38 UTC
hello again sebastian

so ive done everything ive been recommended, and it seems to me the problem is not that the rotating is not working. the button and the design rotates. My problem is that the master view in the split view is being rotated outside of the ipad screen, that is, the detail view is taking up the whole screen. (And i can see the master view for a split second while it is being rotated before it leaves the screen bounds.

This is strange, because everything is rotating. What could be causing this? is there a way to tell the detail view to leave room for the master view?

I hope you understand

Thank you
Comment 5 Roy 2012-10-22 10:38:10 UTC
Here is what i wrote in a post on stackvoerflow .. maybe it sheds more light: 

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.

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

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?

EDIT: 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;
    }
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;
        }
    }



I noticed that the ShouldAutoRotate is getting called on my split view Controller but not on the detail and master view controllers. I use a UITableViewController for the detail view and a UINavigationController for the master view.


pelase help me this is really bad for me that its not working, its for my job.
Comment 6 Sebastien Pouliot 2012-10-22 20:08:01 UTC
It's not clear why your adding iOS6 specific code and still testing the app on iOS5. iOS6 should be compatible with iOS5. OTOH if you add iOS6 code then the behaviour (what's being called from iOS5 and iOS6) will differ and you get to maintain two different code paths for the same result.

It would be a lot simpler if you could just attach a self-contained test case (the smaller, the better) showing your issue. Once we can duplicate the problem the suggestions/fix(es) are generally pretty fast.
Comment 7 PJ 2013-11-19 17:05:17 UTC
This bug has been in the NEEDINFO state with no changes for the last 90 days. Can we put this back into the NEW or CONFIRMED state, or are we still awaiting response?

If there is no change in the status of this bug over the next two weeks, this bug will be marked as NORESPONSE.
Comment 8 PJ 2013-12-05 18:35:36 UTC
This bug has not been changed from the NEEDINFO state since my previous comment, marking as RESOLVED NORESPONSE.

Please feel free to REOPEN this bug at any time if you are still experiencing the issue. Please add the requested information and set the bug back to the NEW (or CONFIRMED) state.