Open sandy-srma opened 10 years ago
I have had this problem too. I am using multipeer connectivity and the weird thing is that it updates perfectly for sent data but not received. I have debugged and logged and the text has been received...just not displayed for an amount of time. Sometimes over a minute.
Solved, Use : [self performSelectorOnMainThread:@Selector(newMessageReceived) withObject:Nil waitUntilDone:No];
-(Void) newMessageReceived{ ..... }
Hi Alex , it's not working , getting same problem. My codesnipet.
NSBubbleData *heyBubble = [NSBubbleData dataWithText:[NSString stringWithFormat:@"%@ wrote:\n%@\n\n", peerDisplayName, receivedText] date:nil type:BubbleTypeSomeoneElse]; [_ChatData addObject:heyBubble]; [self performSelectorOnMainThread:@selector(newMessageReceived) withObject:Nil waitUntilDone:NO];
-(void)newMessageReceived { [_tblChatList reloadData]; }
Any idea what is going wrong with me. Thanks Sandeep Sharma
On 04/05/14 5:00 am, lewisrichardson2103 wrote:
Solved, Use : [self performSelectorOnMainThread:@Selector https://github.com/Selector(newMessageReceived) withObject:Nil waitUntilDone:No];
-(Void) newMessageReceived{ ..... }
— Reply to this email directly or view it on GitHub https://github.com/AlexBarinov/UIBubbleTableView/issues/75#issuecomment-42119265.
Regards, Sandeep Sharma HyTech Professionals An ISO 9001:2008 Certified Company Phone(US): +1-(302) 355 0436 Phone(India):+91-120-4223960, Ext. 226 Email: sandeep.sharma@hytechpro.com Skype: hytechpro_sandeep_sharma1 Website: http://www.hytechpro.com
recievedText = ......; [self performSelectorOnMainThread:@selector(newMessageReceived) withObject:Nil waitUntilDone:NO];
-(void)newMessageRecieved { NSBubbleData *heyBubble = [NSBubbleData dataWithText:[NSString stringWithFormat:@"%@ wrote:\n%@\n\n", peerDisplayName, receivedText] date:nil type:BubbleTypeSomeoneElse]; [_ChatData addObject:heyBubble]; [_tblChatList reloadData] }
on a side note if I have found [_tblChatList performSelectorOnMainThread:@selector(reloadData) withObject:nil waitUntilDone:NO]; is more efficient than using [_tblChatList reload]
Thanks Alex, Would you like to share your linked in or Facebook id with me please.
Regards
On 05/05/14 2:25 pm, lewisrichardson2103 wrote:
recievedText = ......; [self performSelectorOnMainThread:@selector https://github.com/selector(newMessageReceived) withObject:Nil waitUntilDone:NO];
-(void)newMessageRecieved { NSBubbleData *heyBubble = [NSBubbleData dataWithText:[NSString stringWithFormat:@"%@ wrote:\n%@\n\n", peerDisplayName, receivedText] date:nil type:BubbleTypeSomeoneElse]; [_ChatData addObject:heyBubble]; [_tblChatList reloadData] }
on a side note if I have found [_tblChatList performSelectorOnMainThread:@selector https://github.com/selector(reloadData) withObject:nil waitUntilDone:NO]; is more efficient than using [_tblChatList reload]
— Reply to this email directly or view it on GitHub https://github.com/AlexBarinov/UIBubbleTableView/issues/75#issuecomment-42169445.
Regards, Sandeep Sharma HyTech Professionals An ISO 9001:2008 Certified Company Phone(US): +1-(302) 355 0436 Phone(India):+91-120-4223960, Ext. 226 Email: sandeep.sharma@hytechpro.com Skype: hytechpro_sandeep_sharma1 Website: http://www.hytechpro.com
Hi Alex, In background thread m creating a NSBubbleData instance with dataWithText and add it to inside mutable array after that when m reload my tableview in main thread , immediately bubble appear but text visible after 8-10 sec , i debug my code several times to find out whether data is proper coming or not ..but found nothing .
and bubble is also not consistent not draw in circular way . Any idea please help me .
Thanks Sandy