The control is for UI purposes only, I never wrote code to send or receive a message from the server, because I'm not sure whether the user will use a third-party SDK or XMPP or the usual REST API.
So, you make the server part and the user interface part separately.
Your question: Both are sent by me, but it looks in the same window, when I press the send button at the same time, it is displayed in the sender's message and looks a second time in the receiver's message. and the receiver will not receive the message.
Ans: Yes, I did this for a demo purpose, based on the answer you get from the server, you need to make changes to the code.
How to use: 1.Declare NsmutableArray and initialize it to Viewdidload. 2. When you send a message, image, create Bubbledata and add it to the array, and then reload Tableview.
[self adddMediaBubbledata:kTextByme mediaPath:@"Hi, check this new control!" mtime:@"8:30 AM" thumb:@"NA" downloadstatus:@"" sendingStatus:kSent msg_ID:@"AB4353GH"];
Use the types below to send and receive:
kTextByme: if you sending a text kImageByme : if you are sending an Image kTextByOther : if you receiving an Text kImageByOther : if you are receiving an Image
Now update the sending status
kSent : you successfully sent an message kFailed : message sendig failed kSending : your message is sending to server
So, based on the information above, make changes and let me know if you need other help.