重寫UISplitViewControllerDelegate以完成任何需要的操作。從我的應用程序的一個例子:
using System;
using MonoTouch.UIKit;
namespace PythonMath
{
class SplitViewControllerDelegate : UISplitViewControllerDelegate
{
public override bool ShouldHideViewController(
UISplitViewController svc,
UIViewController viewController,
UIInterfaceOrientation inOrientation)
{
return (! InAppPurchaseModel.Editor.Purchased) ||
inOrientation == UIInterfaceOrientation.Portrait ||
inOrientation == UIInterfaceOrientation.PortraitUpsideDown;
}
}
}
然後將其分配給UISplitViewController的委託:
var SplitViewController = new UISplitViewController();
SplitViewController.Delegate = new SplitViewControllerDelegate();
非常感謝你:) – 2013-03-19 21:06:06