[MonoTouch] ShouldHideViewController not being called

Shawn Baker shawn.baker at librestream.com
Fri Oct 28 12:57:23 EDT 2011


I've been testing some of the new SDK 5.0 features, and one of the simpler
ones is the ability to show the master view in portrait mode in the
UISplitViewController. This is done by handling the ShouldHideViewController
event and returning false. I've created my own SplitViewController class,
which is derived from UISplitViewController, and overridden the
ShouldHideViewController method as follows:

public override bool ShouldHideViewController(UISplitViewController svc,
UIViewController viewController, UIInterfaceOrientation inOrientation)
{
	return false;
}

However, this method doesn't get called unless I assign the weak delegate in
the constructor:

WeakDelegate = this;

Is this the way it's supposed to work?

I'm using Xcode 4.2, Mono 2.10.6, MonoTouch 5.0, MonoDevelop 2.8.1, and my
project's Deployment Target is 5.0.


--
View this message in context: http://monotouch.2284126.n4.nabble.com/ShouldHideViewController-not-being-called-tp3948559p3948559.html
Sent from the MonoTouch mailing list archive at Nabble.com.


More information about the MonoTouch mailing list