Apptentive Message单元格颜色变化
嗨我尝试自定义ApptentiveMessageCenterReplyCell, ApptentiveMessageCenterContextMessageCell , ApptentiveMessageCenterMessageCell颜色,因为它被用作Storyboard中的单元格。 在颜色更改我想更新其背景颜色,我无法使用SDK从styleSheet访问它。
iOS SDK版本:apptentive-ios 4.0.7
//示例代码
ApptentiveStyleSheet *style = [[Apptentive sharedConnection]styleSheet]; style.backgroundColor = self.isLightTheme ? [UIColor whiteColor] : [UIColor blackColor]; style.primaryColor = self.isLightTheme ? [UIColor blackColor] : [UIColor whiteColor];
在iPhone X风景中改变颜色的同时面临问题。 无法更改上述单元格UITableViewCell的颜色..
目前,在第一次启动Message Center或Surveys后,样式表对象并不完全支持更改颜色。
但是,当应用程序的主题发生更改时,您应该能够通过使用键值编码将样式表对象上的didInheritColors
布尔属性设置为NO
。
这应该使样式表重新计算从主要颜色和背景颜色确定的各种中间颜色(您可能希望避免在显示消息中心时更改主题,因为它可能导致颜色不一致)。
另一种方法是使用-setColor:forStyle:
在样式表对象上设置显式颜色覆盖,但是您必须对直接设置的颜色和从中计算的中间颜色执行此操作。