【发布时间】:2012-09-23 01:13:24
【问题描述】:
我的 Monotouch iPhone 应用程序中有一个 UIViewController,我想将背景设置为 UITableViewStyle.Grouped 中的背景。但是,当我使用下面的代码时,它会返回一个黑屏。
this.View.BackgroundColor = UIColor.GroupTableViewBackgroundColor; // Black screen
this.View.BackgroundColor = UIColor.Red; // Works
我在 ViewWillAppear 方法中调用它们。如果我注释掉 GroupTable,则背景设置为红色。当我注释掉第二行时,我得到的只是黑屏。
有人知道这是为什么吗?如果您不在 UITableViewController 中,您可以不调用 UIColor.GroupTableViewBackgroundColor 吗?
谢谢
迈克
【问题讨论】: