我(使用 CoccoaPods)从 Pixate 切换到 PixateFreestyle。我没有更改我的代码或样式。
现在不应用此样式:
.posTable {
background-color: #003366;
separator-color: #003366;
}
.posTable table-view-cell {
background-color: #001933;
}
但是,如果我重新保存 CSS(使用实时 CSS),它就会被应用。因为唯一的变化是转移到 PixateFreestyle,我不知道该怎么做(除了切换回来)。
最佳答案
我终于找到了解决方法。
问题在于设置值的顺序。如果设置:
self.documentItemsTable.dataSource = self.documentItemsTable;
self.documentItemsTable.delegate = self.documentItemsTable;
self.documentItemsTable.styleClass = @"posTable";
它失败了。但是,如果设置:
self.documentItemsTable.styleClass = @"posTable";
self.documentItemsTable.delegate = self.documentItemsTable;
它起作用了。事实上,如果委托(delegate)没有设置它就不起作用,或者如果在 styleClass 之前设置它。
关于css - 切换到 PixateFreestyle 后,某些样式在加载时不适用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21995972/