i try to get the text of a cell from a table (in ViewController B) and to display it in a textView (in ViewController A). Everything is fine the first time but when second time a have an error message in the console: "nested pop animation can result in corrupted navigation bar Finishing up a navigation transition in an unexpected state. Navigation Bar subview tree might get corrupted."
My code is : In ViewController B
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
// Retrieve the value of cell selected
self.valeurCell = [NSString stringWithFormat:@"%@", [tableView cellForRowAtIndexPath:indexPath].textLabel.text];
// Send the value of cell in the answer area (class: SendMessagesViewController)
[[NSNotificationCenter defaultCenter] postNotificationName:@"notice" object:self.valeurCell];
}
In ViewController A (viewDidLoad)
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(dataTransfer:) name:@"notice" object:nil];
-(void) dataTransfer:(NSNotification *) sentObject{
// !!! en test !!!
self.textViewMsg.text = (NSString *) [sentObject object] ;
[self.navigationController popViewControllerAnimated:YES];
}
Thank you