public override void ViewDidLoad() { base.ViewDidLoad(); JVMenuHelper.RemoveLayerFromView(ContainerView); // gradient background color var newGradient = (CAGradientLayer)CAGradientLayer.Create(); newGradient.Frame = this.View.Frame; var firstColor = JVMenuHelper.ColorWithHexString("EF4DB6"); var secondColor = JVMenuHelper.ColorWithHexString("C643FC"); newGradient.Colors = new CoreGraphics.CGColor[] { firstColor.CGColor, secondColor.CGColor }; ContainerView.Layer.InsertSublayer(newGradient, 0); Image = JVMenuHelper.ChangeImageColor(UIImage.FromBundle("ask_question-48"), UIColor.Black); ImageView.Image = Image; Label.Text = @"Help?"; }
/// <summary> /// ViewDidLoad /// </summary> public override void ViewDidLoad() { base.ViewDidLoad(); this.View.BackgroundColor = UIColor.Clear; this.View.AutoresizingMask = UIViewAutoresizing.FlexibleHeight | UIViewAutoresizing.FlexibleWidth; this.View.AutosizesSubviews = true; ContainerView = new UIView(this.View.Frame); ContainerView.AutoresizingMask = UIViewAutoresizing.FlexibleHeight | UIViewAutoresizing.FlexibleWidth; ContainerView.AutosizesSubviews = true; // gradient background color Gradient = (CAGradientLayer)CAGradientLayer.Create(); Gradient.Frame = this.View.Frame; var firstColor = JVMenuHelper.ColorWithHexString("52EDC7"); var secondColor = JVMenuHelper.ColorWithHexString("5AC8FB"); Gradient.Colors = new CoreGraphics.CGColor[] { firstColor.CGColor, secondColor.CGColor }; ContainerView.Layer.InsertSublayer(Gradient, 0); Image = JVMenuHelper.ChangeImageColor(JVMenuPopoverConfig.SharedInstance.MenuImage, UIColor.Black); ImageView = new UIImageView(new CGRect(this.View.Frame.Size.Width / 2 - this.Image.Size.Width / 2, this.View.Frame.Size.Height / 2 - 30, this.Image.Size.Width, this.Image.Size.Height)); ImageView.Image = Image; ContainerView.Add(ImageView); Label = new UILabel(new CGRect(this.View.Frame.Size.Width / 2 - 110, this.View.Frame.Size.Height / 2 - 20, 220, 60)); Label.TextColor = UIColor.Black.ColorWithAlpha(0.6f); Label.TextAlignment = UITextAlignment.Center; Label.Font = UIFont.FromName("HelveticaNeue", 20); Label.TextColor = UIColor.Black; Label.Text = @"Home"; ContainerView.Add(Label); this.View.Add(ContainerView); }