void UpdateFlyoutHeader()
        {
            var header = ((IShellController)_shellContext.Shell).FlyoutHeader;

            if (header == _headerView?.View)
            {
                return;
            }

            int previousIndex = GetPreviousIndex(_headerView);

            if (_headerView != null)
            {
                _tableViewController.HeaderView = null;
                _headerView.RemoveFromSuperview();
                _headerView.Dispose();
            }

            if (header != null)
            {
                _headerView = new ShellFlyoutHeaderContainer(((IShellController)_shellContext.Shell).FlyoutHeader);
            }
            else
            {
                _headerView = null;
            }

            _uIViews[HeaderIndex] = _headerView;
            AddViewInCorrectOrder(_headerView, previousIndex);
            _tableViewController.HeaderView = _headerView;
        }
 public ShellTableViewController(IShellContext context, UIContainerView headerView, Action <Element> onElementSelected) : this(context, onElementSelected)
 {
     ShellFlyoutContentManager = new ShellFlyoutLayoutManager(context);
     HeaderView = headerView;
 }