2
我在我的Monotouch iPhone应用程序中有一个UIViewController,我想将背景设置为UITableViewStyle.Grouped中的内容。但是,当我使用下面的代码时,它返回一个黑屏。将背景设置为GroupTableViewBackgroundColor
this.View.BackgroundColor = UIColor.GroupTableViewBackgroundColor; // Black screen
this.View.BackgroundColor = UIColor.Red; // Works
我在ViewWillAppear方法中调用这些方法。如果我注释掉GroupTable,那么后台会被设置为Red。当我将第二行注释掉时,我所得到的只是一个黑屏。
有谁知道这是为什么?如果你不在UITableViewController中,你不能调用UIColor.GroupTableViewBackgroundColor吗?
感谢
迈克
谢谢 - 我在iOS6中开发,所以我的问题是它已被弃用。 – hydev