msgStr= [dict valueForKey:@"enquiry_body"];
NSDictionary *dictionay = [dict objectForKey:@"createdBy"];
idStr= [dictionay valueForKey:@"_id"];
JSQMessage *newMessage= nil;
newMessage= [JSQMessage messageWithSenderId:idStr displayName:@"" text:msgStr];
[self.demoData.messages addObject:newMessage];
Here is my code msgStr
contains message from web service idstr
is user id who previously send this message.
The issue is that the messages sent from the sender get aligned to the left. Although there is no problem with the receiver, the messages received are aligned to left as they should be.The only issue is with those sent by the sender.
Please refer screenshot given below.