I think ViewDidLoad() is too early. Try putting the code in ViewWillAppear(). Thats when the views coordinates are final.
René Von: [email protected] [mailto:[email protected]] Im Auftrag von Chris House Gesendet: Mittwoch, 21. März 2012 22:22 An: [email protected] Betreff: [MonoTouch] Background image not filling screen A screenshot demonstrating my problem can be seen here: http://i44.tinypic.com/288pmo8.png I have an iPad app with a UIToolbar at the top of the screen and a UITabBarController at the bottom of the screen. I want to fill the space between the two with an image. Ive used the following code to do so: public override void ViewDidLoad() { base.ViewDidLoad(); UIImageView backgroundImageView = new UIImageView(this.View.Bounds); backgroundImageView.Image = UIImage.FromBundle(Images/background_image.png); backgroundImageView.ContentMode = UIViewContentMode.ScaleAspectFill; this.View.AddSubview(backgroundImageView); } Ive used this same code in other apps without the toolbar/tab bar controller and it filled the entire screen. As you can see from my screenshot, in this app I am ending up with a gap at the bottom between the image and the tab bar. Im probably missing something obvious. Any pointers in the right direction would be much appreciated. Thanks! Chris
_______________________________________________ MonoTouch mailing list [email protected] http://lists.ximian.com/mailman/listinfo/monotouch
