在中设置背景图像(在所有控件下方)的最佳方法是什么Monotouch.Dialog
?我正在Elements
使用Monotouch.Dialog
.
问问题
1402 次
1 回答
3
主要技巧是将TableView
背景颜色设置为Clear
然后设置ParentViewController.View
为您的图像,例如:
class MyDialogViewController : DialogViewController {
public MyDialogViewController (RootElement root) : base (root)
{
}
public override void LoadView ()
{
base.LoadView ();
TableView.BackgroundColor = UIColor.Clear;
UIImage background = UIImage.FromFile ("background.png");
ParentViewController.View.BackgroundColor = UIColor.FromPatternImage (background);
}
}
于 2011-12-09T13:20:26.813 回答