Add custom header to JSQMessageView Controller

In my chat application, I use JSQMessagesViewController to display the conversation. To start the conversation, I must add recipients to the header of the View controller, and the header should increase with the number of recipients.

How can I achieve this?

enter image description here

+5
source share
1 answer

Hide the default navigation bar and prepare a custom view using DWlist to get the title.

Custom view:

// Initalise and set the frame of the tag list tagList = [[DWTagList alloc] initWithFrame:CGRectMake(20.0f, 70.0f, 280.0f, 300.0f)]; // Add the items to the array NSArray *array = [[NSArray alloc] initWithObjects:@"Foo", @"Tag Label 1", @"Tag Label 2", @"Tag Label 3", @"Tag Label 4", @"Tag Label 5", nil]; [tagList setTags:array]; // Add the taglist to your UIView [self.view addSubview:tagList]; 

https://github.com/domness/DWTagList

0
source

Source: https://habr.com/ru/post/1265546/


All Articles