private void SetupNavigationController() { if (_albumsViewController == null) { _albumsViewController = new GMAlbumsViewController(); } _navigationController = new UINavigationController(_albumsViewController); _navigationController.Delegate = new GMNavigationControllerDelegate(); _navigationController.NavigationBar.Translucent = true; _navigationController.View.Frame = View.Frame; _navigationController.WillMoveToParentViewController(this); View.AddSubview(_navigationController.View); AddChildViewController(_navigationController); _navigationController.DidMoveToParentViewController(this); }
private void SetupNavigationController() { if (_albumsViewController == null) { _albumsViewController = new GMAlbumsViewController(); } _navigationController = new UINavigationController(_albumsViewController); _navigationController.Delegate = new GMNavigationControllerDelegate(); _navigationController.NavigationBar.Translucent = true; _navigationController.NavigationBar.SetBackgroundImage(new UIImage(), UIBarMetrics.Default); _navigationController.NavigationBar.ShadowImage = new UIImage(); _navigationController.View.Frame = View.Frame; _navigationController.WillMoveToParentViewController(this); View.AddSubview(_navigationController.View); AddChildViewController(_navigationController); _navigationController.DidMoveToParentViewController(this); }
public override void ViewDidLoad() { base.ViewDidLoad(); tableView = new UITableView(new RectangleF(0, 0, 320, View.Bounds.Size.Height), UITableViewStyle.Plain); tableView.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight; tableView.BackgroundColor = UIColor.FromRGBA(50f / 255f, 57f / 255f, 74f / 255f, 1f); tableView.SeparatorStyle = UITableViewCellSeparatorStyle.None; TestTableSource tableSource = new TestTableSource(); tableSource.RowSelectedEvent += HandleRowSelectedEvent; tableView.Source = tableSource; View.AddSubview(tableView); ConfigureViewController(initViewController); slideNavigationController = new UINavigationController(initViewController); LWSlideNavigationControllerDelegate navDelegate = new LWSlideNavigationControllerDelegate(); navDelegate.DidShowViewControllerEvent += HandleDidShowViewControllerEvent; slideNavigationController.Delegate = navDelegate; slideNavigationController.View.Layer.ShadowColor = UIColor.Black.CGColor; slideNavigationController.View.Layer.ShadowOffset = new SizeF(0, 0); slideNavigationController.View.Layer.ShadowRadius = 4; slideNavigationController.View.Layer.ShadowOpacity = 0.75f; slideNavigationController.WillMoveToParentViewController(this); AddChildViewController(slideNavigationController); View.AddSubview(slideNavigationController.View); slideNavigationController.DidMoveToParentViewController(this); UIBezierPath path = UIBezierPath.FromRoundedRect(slideNavigationController.View.Bounds, 4.0f); slideNavigationController.View.Layer.ShadowPath = path.CGPath; UIPanGestureRecognizer panRecogniser = new UIPanGestureRecognizer(HandlePan); slideNavigationController.NavigationBar.AddGestureRecognizer(panRecogniser); slideNavigationController.View.AddGestureRecognizer(panRecogniser); slideInTapGestureRecognizer = new UITapGestureRecognizer(HandleSlideInTap); slideInTapGestureRecognizer.Enabled = false; slideNavigationController.View.AddGestureRecognizer(slideInTapGestureRecognizer); }
private void SetupNavigationController() { if (_albumsViewController == null) { _albumsViewController = new GMAlbumsViewController(); } _albumsViewController._picker = this; _albumsViewController.Test(); var _gridViewController = new GMGridViewController(this); _gridViewController.AssetsFetchResults = _albumsViewController._collectionsFetchResultsAssets[0][0]; _navigationController = new UINavigationController(_gridViewController); _navigationController.Delegate = new GMNavigationControllerDelegate(); _navigationController.NavigationBar.Translucent = true; _navigationController.View.Frame = View.Frame; _navigationController.WillMoveToParentViewController(this); View.AddSubview(_navigationController.View); AddChildViewController(_navigationController); _navigationController.DidMoveToParentViewController(this); }
private void SetupNavigationController() { if (_albumsViewController == null) { _albumsViewController = new GMAlbumsViewController (); } _navigationController = new UINavigationController (_albumsViewController); _navigationController.Delegate = new GMNavigationControllerDelegate (); _navigationController.NavigationBar.Translucent = true; _navigationController.View.Frame = View.Frame; _navigationController.WillMoveToParentViewController (this); View.AddSubview (_navigationController.View); AddChildViewController (_navigationController); _navigationController.DidMoveToParentViewController (this); }
public override void ViewDidLoad() { base.ViewDidLoad (); tableView = new UITableView(new RectangleF(0,0,320, View.Bounds.Size.Height), UITableViewStyle.Plain); tableView.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight; tableView.BackgroundColor = UIColor.FromRGBA(50f/255f,57f/255f,74f/255f,1f); tableView.SeparatorStyle = UITableViewCellSeparatorStyle.None; TestTableSource tableSource = new TestTableSource(); tableSource.RowSelectedEvent += HandleRowSelectedEvent; tableView.Source = tableSource; View.AddSubview(tableView); ConfigureViewController(initViewController); slideNavigationController = new UINavigationController(initViewController); LWSlideNavigationControllerDelegate navDelegate = new LWSlideNavigationControllerDelegate(); navDelegate.DidShowViewControllerEvent += HandleDidShowViewControllerEvent; slideNavigationController.Delegate = navDelegate; slideNavigationController.View.Layer.ShadowColor = UIColor.Black.CGColor; slideNavigationController.View.Layer.ShadowOffset = new SizeF(0,0); slideNavigationController.View.Layer.ShadowRadius = 4; slideNavigationController.View.Layer.ShadowOpacity = 0.75f; slideNavigationController.WillMoveToParentViewController(this); AddChildViewController(slideNavigationController); View.AddSubview(slideNavigationController.View); slideNavigationController.DidMoveToParentViewController(this); UIBezierPath path = UIBezierPath.FromRoundedRect(slideNavigationController.View.Bounds, 4.0f); slideNavigationController.View.Layer.ShadowPath = path.CGPath; UIPanGestureRecognizer panRecogniser = new UIPanGestureRecognizer(HandlePan); slideNavigationController.NavigationBar.AddGestureRecognizer(panRecogniser); slideNavigationController.View.AddGestureRecognizer(panRecogniser); slideInTapGestureRecognizer = new UITapGestureRecognizer(HandleSlideInTap); slideInTapGestureRecognizer.Enabled = false; slideNavigationController.View.AddGestureRecognizer(slideInTapGestureRecognizer); }