UITableViewController Background Image?

Tri.LocoTri.Loco USMember ✭✭

How to change the background with an image of UITableViewController? I'm using a custom cell too

Posts

  • TobiasRddigerTobiasRddiger DEUniversity

    hey you can't set a background image for a UITableViewController. Instead you have to set a background for the UITableView of the Controller. This can be easily done by setting the tableView.backgroundView to an UIImageView of your choice.

  • Tri.LocoTri.Loco USMember ✭✭

    Oh. how do you set the backgroundView's image programatically?

    bottomline is I'm trying to achieve a table with a transparent cells and with a background image.

  • Tri.LocoTri.Loco USMember ✭✭
    edited August 2015

    managed to solve it.

    var imageView = new UIImageView (UIImage.FromFile("Image/Default.png")); imageView.Frame = new CoreGraphics.CGRect (50,50,imageView.Image.CGImage.Width, imageView.Image.CGImage.Height); this.TableView.BackgroundView = imageView;

    translucent navigation bar

    this.NavigationController.NavigationBar.SetBackgroundImage(new UIImage (), UIBarMetrics.Default); this.NavigationController.NavigationBar.ShadowImage = new UIImage (); this.NavigationController.NavigationBar.Translucent = true;

Sign In or Register to comment.