public override void ViewDidLoad() { base.ViewDidLoad(); //this.TableView.ContentInset = new UIEdgeInsets(20, 0, 0, 0); this.TableView.RowHeight = 110; this.NavigationController.NavigationBar.BarTintColor = HelperMethods.GetLime(); var nextBarButtonItem = new UIBarButtonItem("Next", UIBarButtonItemStyle.Plain, (sender, args) => { //StepTwoSeque PerformSegue("StepTwoSeque", this); }); UITextAttributes icoFontAttribute = new UITextAttributes(); icoFontAttribute.Font = UIFont.BoldSystemFontOfSize(20); icoFontAttribute.TextColor = UIColor.White; nextBarButtonItem.SetTitleTextAttributes(icoFontAttribute, UIControlState.Normal); this.NavigationItem.SetRightBarButtonItem(nextBarButtonItem, true); var cancelBarButtonItem = new UIBarButtonItem("Cancel", UIBarButtonItemStyle.Plain, (sender, args) => { // button was clicked }); cancelBarButtonItem.SetTitleTextAttributes(icoFontAttribute, UIControlState.Normal); this.NavigationItem.SetLeftBarButtonItem(cancelBarButtonItem, true); NavigationItem.BackBarButtonItem = new UIBarButtonItem("Back", UIBarButtonItemStyle.Plain, null); }
public ClassificationCell(CGRect frame) : base(frame) { BackgroundView = new UIView { BackgroundColor = UIColor.LightGray, Alpha = (nfloat).5 }; BackgroundView.Layer.CornerRadius = 6.0f; SelectedBackgroundView = new UIView { BackgroundColor = HelperMethods.GetLime(), Alpha = (nfloat).5 }; SelectedBackgroundView.Layer.CornerRadius = 6.0f; ContentView.Layer.BorderColor = UIColor.Clear.CGColor; ContentView.Layer.BorderWidth = 0.0f; ContentView.Layer.CornerRadius = 6.0f; ContentView.Layer.ShadowColor = UIColor.DarkGray.CGColor; ContentView.Layer.ShadowOpacity = 1.0f; ContentView.Layer.ShadowRadius = 6.0f; ContentView.Layer.ShadowOffset = new System.Drawing.SizeF(0f, 3f); imageView = new UIImageView(new CGRect(0, frame.Height / 4, frame.Width - 10, frame.Height / 2)); imageView.ContentMode = UIViewContentMode.ScaleAspectFit; imageView.Image = UIImage.FromBundle("airplane.png"); imageView.Center = ContentView.Center; classificationLabel = new UILabel(new CGRect(0, 5, frame.Width, frame.Height / 5)); classificationLabel.Font = UIFont.SystemFontOfSize(UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad ? 18 : 8); classificationLabel.TextAlignment = UITextAlignment.Center; ContentView.AddSubview(imageView); ContentView.AddSubview(classificationLabel); }
public override UIView GetViewForHeader(UITableView tableView, nint section) { var viewHeight = UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad ? 55.0f : 40.0f; UIView view = new UIView(new System.Drawing.RectangleF(0, 0, (float)this.View.Frame.Width, viewHeight)); view.BackgroundColor = UIColor.White; UILabel label = new UILabel(); label.Opaque = false; label.TextColor = HelperMethods.GetLime(); var fontSize = UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad ? 35.0f : 25.0f; label.Font = UIFont.BoldSystemFontOfSize(fontSize); label.Frame = new System.Drawing.RectangleF(0, 0, (float)view.Frame.Width - 30, viewHeight); label.Center = view.Center; view.AddSubview(label); switch (section) { case 0: { label.Text = "Purchase Timeframe"; break; } case 1: { label.Text = "Why do you fly?"; break; } case 2: { label.Text = "Flight hours"; break; } case 3: { label.Text = "Order By (optional)"; break; } } return(view); }