本文整理汇总了C#中UISplitViewController类的典型用法代码示例。如果您正苦于以下问题:C# UISplitViewController类的具体用法?C# UISplitViewController怎么用?C# UISplitViewController使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UISplitViewController类属于命名空间,在下文中一共展示了UISplitViewController类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FinishedLaunching
//
// This method is invoked when the application has loaded and is ready to run. In this
// method you should instantiate the window, load the UI into it and then make the window
// visible.
//
// You have 17 seconds to return from this method, or iOS will terminate your application.
//
public override bool FinishedLaunching (UIApplication app, NSDictionary options)
{
// create a new window instance based on the screen size
window = new UIWindow (UIScreen.MainScreen.Bounds);
// load the appropriate UI, depending on whether the app is running on an iPhone or iPad
if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Phone) {
var controller = new RootViewController ();
navigationController = new UINavigationController (controller);
window.RootViewController = navigationController;
} else {
var masterViewController = new RootViewController ();
var masterNavigationController = new UINavigationController (masterViewController);
var detailViewController = new DetailViewController ();
var detailNavigationController = new UINavigationController (detailViewController);
splitViewController = new UISplitViewController ();
splitViewController.WeakDelegate = detailViewController;
splitViewController.ViewControllers = new UIViewController[] {
masterNavigationController,
detailNavigationController
};
window.RootViewController = splitViewController;
}
// make the window visible
window.MakeKeyAndVisible ();
return true;
}
开发者ID:XamarinControls,项目名称:govindaraokondala-horizontal-scrolling-in-Table-in-IOS,代码行数:38,代码来源:AppDelegate.cs
示例2: SetRootViewController
protected override void SetRootViewController ()
{
if (IsPhone) {
window.RootViewController = docListNav;
} else {
var blankVC = new BlankVC ();
blankVC.View.BackgroundColor = UIColor.White;
detailNav = new UINavigationController (blankVC);
detailNav.NavigationBar.BarStyle = Theme.NavigationBarStyle;
detailNav.ToolbarHidden = false;
Theme.Apply (detailNav.Toolbar);
split = new UISplitViewController {
PresentsWithGesture = false,
ViewControllers = new UIViewController[] {
docListNav,
detailNav,
},
Delegate = new SplitDelegate (),
};
window.RootViewController = split;
}
}
示例3: ShouldHideViewController
public override bool ShouldHideViewController(UISplitViewController svc, UIViewController viewController, UIInterfaceOrientation inOrientation)
{
//return true; // always hide
//return true; // never hide
return inOrientation == UIInterfaceOrientation.Portrait
|| inOrientation == UIInterfaceOrientation.PortraitUpsideDown;
}
示例4: DisplayContentController
/// <summary>
/// Displays the content UISplitViewController.
/// </summary>
/// <param name="content">The content.</param>
public void DisplayContentController(UISplitViewController content)
{
AddChildViewController(content);
content.View.Frame = View.Frame;
View.AddSubview(content.View);
DidMoveToParentViewController(this);
}
示例5: WillShowViewController
public override void WillShowViewController(UISplitViewController svc, UIViewController aViewController, UIBarButtonItem button)
{
_pc = null;
_lefty = null;
ReplaceDetailNavigationViewController();
}
示例6: FinishedLaunching
//
// This method is invoked when the application has loaded and is ready to run. In this
// method you should instantiate the window, load the UI into it and then make the window
// visible.
//
// You have 17 seconds to return from this method, or iOS will terminate your application.
//
public override bool FinishedLaunching(UIApplication app, NSDictionary options)
{
// create a new window instance based on the screen size
window = new UIWindow (UIScreen.MainScreen.Bounds);
var masterViewController = new RootViewController ();
var masterNavigationController = new UINavigationController (masterViewController);
var detailViewController = new DetailViewController ();
var detailNavigationController = new UINavigationController (detailViewController);
masterViewController.DetailViewController = detailViewController;
splitViewController = new UISplitViewController ();
splitViewController.WeakDelegate = detailViewController;
splitViewController.ViewControllers = new UIViewController[] {
masterNavigationController,
detailNavigationController
};
window.RootViewController = splitViewController;
// make the window visible
window.MakeKeyAndVisible ();
return true;
}
示例7: WillShowViewController
public override void WillShowViewController (UISplitViewController svc, UIViewController aViewController, UIBarButtonItem button)
{
var items = new List<UIBarButtonItem> (Parent.Toolbar.Items);
items.RemoveAt (0);
Parent.Toolbar.SetItems (items.ToArray (), true);
Parent.MainPopoverController = null;
}
示例8: WillHideViewController
public override void WillHideViewController (UISplitViewController svc, UIViewController aViewController, UIBarButtonItem barButtonItem, UIPopoverController pc)
{
barButtonItem.Title = "MasterList";
var items = new List<UIBarButtonItem> (Parent.Toolbar.Items);
items.Insert (0, barButtonItem);
Parent.Toolbar.SetItems (items.ToArray (), true);
Parent.MainPopoverController = pc;
}
示例9: WillHideViewController
public override void WillHideViewController(UISplitViewController svc, UIViewController aViewController, UIBarButtonItem barButtonItem, UIPopoverController pc)
{
_svc = svc as SplitViewController;
_lefty = barButtonItem;
_lefty.Title = "Home";
_pc = pc;
ReplaceDetailNavigationViewController();
}
示例10: WillHideViewController
public override void WillHideViewController (UISplitViewController svc, UIViewController aViewController, UIBarButtonItem barButtonItem, UIPopoverController pc)
{
PatientDetailViewController dvc = svc.ViewControllers[1] as PatientDetailViewController;
if (dvc != null) {
dvc.AddNavBarButton (barButtonItem);
dvc.Popover = pc;
}
}
示例11: WillShowViewController
public override void WillShowViewController (UISplitViewController svc, UIViewController aViewController, UIBarButtonItem button)
{
SpeakerSessionMasterDetail dvc = svc.ViewControllers[1] as SpeakerSessionMasterDetail;
if (dvc != null) {
dvc.RemoveNavBarButton ();
dvc.Popover = null;
}
}
示例12: WillShowViewController
public override void WillShowViewController (UISplitViewController svc, UIViewController aViewController, UIBarButtonItem button)
{
PatientDetailViewController dvc = svc.ViewControllers[1] as PatientDetailViewController;
if (dvc != null) {
dvc.RemoveNavBarButton ();
dvc.Popover = null;
}
}
示例13: WillHideViewController
public override void WillHideViewController (UISplitViewController svc, UIViewController aViewController, UIBarButtonItem barButtonItem, UIPopoverController pc)
{
SessionSpeakersMasterDetail dvc = svc.ViewControllers[1] as SessionSpeakersMasterDetail;
if (dvc != null) {
dvc.AddNavBarButton (barButtonItem);
dvc.Popover = pc;
} else Console.WriteLine ("SessionSplitViewController dvc == null (hide)");
}
示例14: WillShowViewController
public override void WillShowViewController (UISplitViewController svc, UIViewController aViewController, UIBarButtonItem button)
{
SessionSpeakersMasterDetail dvc = svc.ViewControllers[1] as SessionSpeakersMasterDetail;
if (dvc != null) {
dvc.RemoveNavBarButton ();
dvc.Popover = null;
} else Console.WriteLine ("SessionSplitViewController dvc == null (show)");
}
示例15: WillHideViewController
public override void WillHideViewController (UISplitViewController svc, UIViewController aViewController, UIBarButtonItem barButtonItem, UIPopoverController pc)
{
SpeakerSessionMasterDetail dvc = svc.ViewControllers[1] as SpeakerSessionMasterDetail;
if (dvc != null) {
dvc.AddNavBarButton (barButtonItem);
dvc.Popover = pc;
}
}