我正在尝试制作更多视图以匹配我的应用程序主题
表格单元格不会改变背景颜色。我已经尝试了几乎所有的答案和互联网上的博客。
tabBarController?.moreNavigationController.topViewController?.view.backgroundColor = UIColor.blackColor()
Run Code Online (Sandbox Code Playgroud)
我已经使用上面的代码来实现图像中显示的当前场景。
override func viewDidLoad() {
self.homeTableView.registerNib(UINib(nibName: "Banner", bundle: nil), forCellReuseIdentifier: "Banner")
self.homeTableView.registerNib(UINib(nibName: "Heading", bundle: nil), forCellReuseIdentifier: "Heading")
self.homeTableView.registerNib(UINib(nibName: "ThumblessList", bundle: nil), forCellReuseIdentifier: "ThumblessList")
self.homeTableView.registerNib(UINib(nibName: "MapCell", bundle: nil), forCellReuseIdentifier: "MapCell")
self.homeTableView.registerNib(UINib(nibName: "CallButton", bundle: nil), forCellReuseIdentifier: "CallButton")
self.searchBar.showsCancelButton = true
self.edgesForExtendedLayout = UIRectEdge.None
self.extendedLayoutIncludesOpaqueBars = false
self.automaticallyAdjustsScrollViewInsets = false
tabBarController?.moreNavigationController.topViewController?.view.backgroundColor = UIColor.blackColor()
}
Run Code Online (Sandbox Code Playgroud) 我试图使用不同的属性多次调用表单中的表单小部件。我收到错误 -Field "x" has already been rendered, save the result of previous render call to a variable and output that instead.
我已经修复了所有可以修复的地方,但有些字段需要不同的属性。例如 :-
form_widget(foo.bar, {'value' : 'image'}) }}
Run Code Online (Sandbox Code Playgroud)
和
form_widget(foo.bar, { 'attr': { 'class': 'hidden' }} )
Run Code Online (Sandbox Code Playgroud)
是否可以在同一表单上调用具有不同参数的表单小部件?