Beispiel #1
0
        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);
        }
        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);
        }