Xamarin.ios 将背景设置为GroupTableViewBackgroundColor
我的Monotouch iPhone应用程序中有一个UIViewController,我想将背景设置为UITableViewStyle.com中的背景。但是,当我使用下面的代码时,它返回一个黑屏Xamarin.ios 将背景设置为GroupTableViewBackgroundColor,xamarin.ios,uitableview,Xamarin.ios,Uitableview,我的Monotouch iPhone应用程序中有一个UIViewController,我想将背景设置为UITableViewStyle.com中的背景。但是,当我使用下面的代码时,它返回一个黑屏 this.View.BackgroundColor = UIColor.GroupTableViewBackgroundColor; // Black screen this.View.BackgroundColor = UIColor.Red; // Works 我在viewwillappearc
this.View.BackgroundColor = UIColor.GroupTableViewBackgroundColor; // Black screen
this.View.BackgroundColor = UIColor.Red; // Works
我在viewwillappearch方法中调用这些。如果我注释掉GroupTable,则背景设置为红色。当我注释掉第二行时,我得到的只是一个黑屏
有人知道这是为什么吗?如果不在UITableViewController中,是否可以调用UIColor.GroupTableViewBackgroundColor
谢谢
Mike我在当前的项目中使用了它,它工作得很好,我有xcode 4.0和simulator 4.3 我在网上发现它在ios 6上已被弃用 我曾经这样用过
[self.tableview setBackgroundColor:[UIColor groupTableViewBackgroundColor]];
只要看看这个链接
作为替代方案,您可以在internet上找到与UItableview分组样式背景相同的图像。谢谢-我正在iOS6中开发,所以我的问题是它已被弃用。