I am using Apptentive, and i am trying to customise message center of same.I want to change "ApptentiveColorContextBackground" color, but i am unable to figure out from where it changes the link says user can modify the UI.
Any help will be great.!
Edited :-
Tried this
in ApptentiveMessageCenterViewController.m
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
switch ([self.dataSource cellTypeAtIndexPath:indexPath]) {
case ATMessageCenterMessageTypeMessage:
case ATMessageCenterMessageTypeCompoundMessage:
[(ApptentiveStyleSheet *)Apptentive.shared.styleSheet setColor:[UIColor redColor] forStyle:ApptentiveColorMessageBackground];
cell.contentView.backgroundColor = [[Apptentive sharedConnection].styleSheet colorForStyle:ApptentiveColorMessageBackground];
break;
case ATMessageCenterMessageTypeReply:
case ATMessageCenterMessageTypeCompoundReply:
cell.contentView.backgroundColor = [[Apptentive sharedConnection].styleSheet colorForStyle:ApptentiveColorReplyBackground];
case ATMessageCenterMessageTypeContextMessage:
[(ApptentiveStyleSheet *)Apptentive.shared.styleSheet setColor:[UIColor redColor] forStyle:ApptentiveColorContextBackground];
cell.contentView.backgroundColor = [[Apptentive sharedConnection].styleSheet colorForStyle:ApptentiveColorContextBackground];
}
}
When it's initialized, the
Apptentivesingleton sets itsstyleSheetproperty to an instance ofApptentiveStyleSheet.There are a few built-in color properties you can modify (foreground, background, and so on), from which all of the other colors are derived.
You can also override a specific color (or font) as follows (Swift):
Or in Objective-C:
You'll want to do these overrides early in the app lifecycle, for instance in
-application:didFinishLaunchingWithOptions:.You can also create your own object that implements the
ApptentiveStyleprotocol (and set it on theApptentivesingleton), but you'll have to either subclassApptentiveStyleSheetor do a fair amount of work to return valid colors and fonts for all of the styles/colors.