// TUIConversationConfig.h/*** Background color of conversation list.*/@property (nonatomic, strong) UIColor *listBackgroundColor;/*** Background color of cell in conversation list.* This configuration takes effect in all cells.*/@property (nonatomic, strong) UIColor *cellBackgroundColor;/*** Background color of pinned cell in conversation list.* This configuration takes effect in all pinned cells.*/@property (nonatomic, strong) UIColor *pinnedCellBackgroundColor;
// When to call: Before initializing conversation list.[TUIConversationConfig sharedConfig].listBackgroundColor = [UIColor tui_colorWithHex:@"#FFFFF0"];[TUIConversationConfig sharedConfig].cellBackgroundColor = [UIColor tui_colorWithHex:@"#F0FFF0"];[TUIConversationConfig sharedConfig].pinnedCellBackgroundColor = [UIColor tui_colorWithHex:@"#E1FFFF"];
Set Background Color | Default |
| |
// TUIConversationConfig.h/*** Font of title label of cell in conversation list.* This configuration takes effect in all cells.*/@property (nonatomic, strong) UIFont *cellTitleLabelFont;/*** Font of subtitle label of cell in conversation list.* This configuration takes effect in all cells.*/@property (nonatomic, strong) UIFont *cellSubtitleLabelFont;/*** Font of time label of cell in conversation list.* This configuration takes effect in all cells.*/@property (nonatomic, strong) UIFont *cellTimeLabelFont;
// When to call: Before initializing conversation list.[TUIConversationConfig sharedConfig].cellTitleLabelFont = [UIFont systemFontOfSize:18];[TUIConversationConfig sharedConfig].cellSubtitleLabelFont = [UIFont systemFontOfSize:14];[TUIConversationConfig sharedConfig].cellTimeLabelFont = [UIFont systemFontOfSize:16];
Set Font | Default |
| |
// TUIConversationConfig.h/*** Display unread count icon in each conversation cell.* The default value is YES.*/@property(nonatomic, assign) BOOL showCellUnreadCount;
// When to call: Before initializing conversation list.[TUIConversationConfig sharedConfig].showCellUnreadCount = NO;
Do not display the unread red dot on the conversation cell | Default |
| |
// TUIConversationConfig.h/*** Display user's online status icon in conversation and contact list.* The default value is NO.*/@property(nonatomic, assign) BOOL showUserOnlineStatusIcon;
// When to call: Before initializing conversation list.[TUIConversationConfig sharedConfig].showUserOnlineStatusIcon = YES;
Show online status | Default |
| |
// TUIConversationConfig.h@protocol TUIConversationConfigDataSource <NSObject>/*** Implement this method to hide items in more menu.*/- (NSInteger)conversationShouldHideItemsInMoreMenu:(TUIConversationCellData *)data;/*** Implement this method to add new items.*/- (NSArray *)conversationShouldAddNewItemsToMoreMenu:(TUIConversationCellData *)data;@end
// When to call: Before initializing conversation list.[TUIConversationConfig sharedConfig].moreMenuDataSource = self;- (NSInteger)conversationShouldHideItemsInMoreMenu:(TUIConversationCellData *)data {if (data.groupID != nil) {return TUIConversationItemInMoreMenu_Hide | TUIConversationItemInMoreMenu_Pin;}return 0;}- (NSArray *)conversationShouldAddNewItemsToMoreMenu:(TUIConversationCellData *)data {if (data.groupID != nil) {UIAlertAction *action1 = [UIAlertAction actionWithTitle:@"action1"style:UIAlertActionStyleDefaulthandler:^(UIAlertAction *_Nonnull action) {NSLog(@"action1 is clicked");}];UIAlertAction *action2 = [UIAlertAction actionWithTitle:@"action2"style:UIAlertActionStyleDefaulthandler:^(UIAlertAction *_Nonnull action) {NSLog(@"action2 is clicked");}];return @[action1, action2];}return nil;}
Hide and Add Options | Default |
| |
Was this page helpful?