public override void ViewDidLoad() { base.ViewDidLoad(); View.Layer.MasksToBounds = false; View.Layer.ShadowColor = Constants.Color.Black.CGColor; View.Layer.ShadowOffset = new CGSize(2, 2); View.Layer.ShadowRadius = 5; View.BackgroundColor = UIColor.Clear; blurView = new UIVisualEffectView(UIBlurEffect.FromStyle(UIBlurEffectStyle.ExtraLight)) { TranslatesAutoresizingMaskIntoConstraints = false, }; View.AddSubview(blurView); blurView.LeftAnchor.ConstraintEqualTo(View.LeftAnchor).Active = true; blurView.RightAnchor.ConstraintEqualTo(View.RightAnchor).Active = true; blurView.TopAnchor.ConstraintEqualTo(View.TopAnchor).Active = true; blurView.BottomAnchor.ConstraintEqualTo(View.BottomAnchor).Active = true; logoutButton = new UIButton { TranslatesAutoresizingMaskIntoConstraints = false, }; logoutButton.SetTitle("LOGOUT", UIControlState.Normal); logoutButton.TitleLabel.Font = Constants.Fonts.RubikOfSize(Constants.Fonts.Size.Fourteen); logoutButton.SetTitleColor(Constants.Color.Red, UIControlState.Normal); View.AddSubview(logoutButton); logoutButton.BottomAnchor.ConstraintEqualTo(View.BottomAnchor).Active = true; logoutButton.RightAnchor.ConstraintEqualTo(View.RightAnchor).Active = true; logoutButton.LeftAnchor.ConstraintEqualTo(View.LeftAnchor, Constants.MenuRightMargin).Active = true; logoutButton.HeightAnchor.ConstraintEqualTo(Constants.MenuCellHeight * 2).Active = true; menuTableViewSource = new MenuTableViewSource(); tableView = new UITableView { TranslatesAutoresizingMaskIntoConstraints = false, AlwaysBounceVertical = true, Source = menuTableViewSource, SeparatorStyle = UITableViewCellSeparatorStyle.None, TableFooterView = new UIView(), BackgroundColor = UIColor.Clear, DelaysContentTouches = false, }; tableView.RegisterClassForCellReuse(typeof(MenuProfileTableViewCell), typeof(MenuProfileTableViewCell).Name); tableView.RegisterClassForCellReuse(typeof(MenuItemTableViewCell), typeof(MenuItemTableViewCell).Name); tableView.RegisterClassForCellReuse(typeof(MenuSeparatorTableViewCell), typeof(MenuSeparatorTableViewCell).Name); View.AddSubview(tableView); tableView.RightAnchor.ConstraintEqualTo(View.RightAnchor).Active = true; tableView.TopAnchor.ConstraintEqualTo(View.TopAnchor).Active = true; tableView.BottomAnchor.ConstraintEqualTo(logoutButton.TopAnchor).Active = true; tableView.LeftAnchor.ConstraintEqualTo(View.LeftAnchor).Active = true; }
public override void ViewDidLoad() { base.ViewDidLoad(); MenuTableViewSource menuTableViewSource = new MenuTableViewSource(); menuTableView.Source = menuTableViewSource; menuTableViewSource.MenuSelected += MenuSelected; InitializeView(); menuTableView.Hidden = true; shadowView.Hidden = true; this.navigationBar.TitleTextAttributes = new UIStringAttributes() { ForegroundColor = UIColor.White }; IMainScreenContainable iViewController = (IMainScreenContainable)containerViewController; this.navigationItem.Title = iViewController.NavigationTitle; //Have no idea why the standard NavigationItem poperty of the ViewController doesnt relate to the navigation bar //// Move this block to the Launch screen - Moved to app delegate //IoCManager.UnityContainer.RegisterType<IDataAccess, RealmDataAccess>(); //IoCManager.UnityContainer.RegisterType<IDataLoader, EmbeddedResourceDataLoader>(); //IoCManager.UnityContainer.RegisterType<IImageDimension, IosImageDimensions> (); //DbManager.UpdateDatabase (); //// End of block }
private void SetupTableView() { var tableView = MenuTableView; source = new MenuTableViewSource(tableView); tableView.Source = source; source.NavigateOtherViewModel = ViewModel.NavigateOtherViewModel; tableView.RowHeight = UITableView.AutomaticDimension; tableView.TableFooterView = new UIView(CGRect.Empty); tableView.AlwaysBounceVertical = false; tableView.RegisterNibForCellReuse(MenuCell.Nib, MenuCell.Key); }