void CommonInit() { fhvc = new MDCFlexibleHeaderViewController(); AddChildViewController(fhvc); CGRect imageViewFrame = fhvc.HeaderView.Bounds; imageView = new UIImageView(imageViewFrame); imageView.ContentMode = UIViewContentMode.ScaleAspectFill; imageView.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight; fhvc.HeaderView.AddSubview(imageView); appBar = new MDCAppBar(); AddChildViewController(appBar.HeaderViewController); appBar.HeaderViewController.HeaderView.BackgroundColor = UIColor.Clear; appBar.NavigationBar.TintColor = UIColor.White; var backButton = new UIBarButtonItem("", UIBarButtonItemStyle.Done, DidTapBack); var backImage = UIImage.FromBundle("Back"); backButton.Image = backImage; NavigationItem.LeftBarButtonItem = backButton; }
public PestoSettingsViewController() : base() { Title = "Settings"; appBar = new MDCAppBar(); AddChildViewController(appBar.HeaderViewController); tealColor = new UIColor(0f, 0.67f, 0.55f, 1f); appBar.HeaderViewController.HeaderView.BackgroundColor = tealColor; appBar.NavigationBar.TintColor = UIColor.White; UITextAttributes myTextAttrib = new UITextAttributes(); var attr = new NSDictionary <NSString, NSObject>( UIStringAttributeKey.ForegroundColor, UIColor.White); appBar.NavigationBar.TitleTextAttributes = attr; //Styler.CellStyle = MDCCollectionViewCellStyle.Card; }