开发者

MonoTouch.Dialog: iPad not getting background Image set

using MonoTouch.Dialog I create a simple ViewController:

In the LoadView I set the background image. This works in iPhone, but not in iPad. There is nothing else to the app at this point:

public override void LoadView ()
{
    base.LoadView ();
    var color = UIColor.FromPatte开发者_如何学PythonrnImage (image);
    TableView.BackgroundColor = UIColor.Clear;
    ParentViewController.View.BackgroundColor = color;
}

is there a reason why iPads don't get their background set?


To set the background image of a UITableView in MonoTouch.Dialog on an iPad:

TableView.BackgroundView = 
     new UIView(ParentViewController.View.Frame) 
         {BackgroundColor = color};

where color is an UIColor image

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜