Reputation: 1472
so basically I have a UITableView and when using it to switch between other views some times going back to the main view the view I was just at gets "stuck". The Bar at top switches to the right title and the back button disappears but the Tableview is now covered by the view I was just at. This only happens after about 10 times though of switching, anyhelp? thanks!
Error:
CoreAnimation: ignoring exception: *** Collection <__NSArrayM: 0x4e33140> was mutated while being enumerated.(
"<Note: 0x4e0e520>",
"<Note: 0x4e0d1b0>"
)
I should probably add that "Note" is just a NSObject
code for switching: RootViewController.m
//create a string at the index of array where you clicked
Note *note = [listOfItems objectAtIndex:indexPath.row];
//Create view controller
EditView *editView = [[EditView alloc]init];
//Pass a long object
[editView setNote:note];
//Push, release
[self.navigationController pushViewController:editView animated:YES];
[editView release];
This code seems to be causing some issue, it's basically to resave an object to an array with a added atribute. Its used with EditView.
-(void)viewDidDisappear:(BOOL)animated{
for(Note *i in [Data sharedData].listOfItems){
if (i == note) {
i.info = infoField.text;
[[Data sharedData].listOfItems replaceObjectAtIndex:[[Data sharedData].listOfItems indexOfObject:i] withObject:i];
NSLog(@"%@",i);
}
}
}
Upvotes: 0
Views: 537
Reputation: 2440
I had similar issue. It was when I tried to mess up with animation UINavigationController apply to views. And it almost every-time was in popViewController. Check how you popping view controller, and try to avoid custom animation if you doing some.
Upvotes: 1