I am designing a one-to-one chatting interface using table view. This table view is modified to show bubbles as some new message arrives. The new message arrives through a push-notification in this case. I call following code in my function which receives message through the push notification:
-(void)messageReceived: (NSString *)message{
_message=[message retain];
[tableView reloadData];
}
However, it seems this does not reload my table view.
If I place the call for reloadData
in the viewDidAppear
function, it reloads fine. It also reloads fine, if I place the reloadData
call in a function whose return type is IBAction
(ex: a function binding to button click)
What could be the reason for reloadData
to not get triggered through custom declared functions ?