我有一个带有Sections的RootElement。一节有RadioElements。如何更改子部分的BackgroundView?
这样的东西不起作用,因为尚未创建子视图。:
rootGroups = new RootElement ("Ideas", rdoGroup) {
new RootElement ("Baha'i") {
new Section (){
new RadioElement ("Peace"),
new RadioElement ("Unity"),
new RadioElement ("Science")
}
}
};
???
rootGroups.TableView.BackgroundColor = ...;
答案 0 :(得分:2)
如果要创建具有两个不同背景的两个不同视图,则必须为第二个根创建另一个dialogViewController,这样您就可以更改背景。
为此,不要使用常规的RootElement构造函数,而是使用RootElement构造函数,该构造函数采用可以按需创建UIViewController的委托方法。